Re: [scikit-learn] SVM-RFE

2019-11-19 Thread Brown J.B. via scikit-learn
Dear Malik,

Your request to do performance checking of the steps of SVM-RFE is a pretty
common task.

Since the contributors to scikit-learn have done great to make the
interface to RFE easy to use, the only real work required from you would be
to build a small wrapper function that:
(a) computes the step sizes you want to output prediction performances for,
and
(b) loops over the step sizes, making each step size the n_features
attribute of RFE (and built from the remaining features), making
predictions from a SVM retrained (and possibly optimized) on the reduced
feature set, and then outputting your metric(s) appropriate to your problem.

Tracing the feature weights is then done by accessing the "coef_" attribute
of the linear SVM trained.
This can be output in loop step (b) as well.

where each time 10% for the features are removed.
> How one can get the accuracy overall the levels of the elimination stages.
> For example, I want to get performance over 1000 features, 900 features,
> 800 features,,2 features, 1 feature.
>

Just a technicality, but by 10% reduction you would have
1000, 900, 810, 729, 656, ... .
Either way, if you allow your wrapper function to take a pre-computed list
of feature sizes, you can flexibly change between a systematic way or a
context-informed way of specifying feature sizes (and resulting weights) to
trace.

Hope this helps.

J.B. Brown
Kyoto University Graduate School of Medicine
___
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn


[scikit-learn] SVM-RFE

2019-11-19 Thread Malik Yousef
Hello,
Let's assume that I have data with 1000 features. I want to apply SVM-RFE
on this data where each time 10% for the features are removed.
How one can get the accuracy overall the levels of the elimination stages.
For example, I want to get performance over 1000 features, 900 features,
800 features,,2 features, 1 feature.
Also, I want to keep track of the features in each level.

[image: image.png]

Best

---
*Prof. Malik Yousef (Associate Professor)  *
*The Head of the** Galilee Digital Health Research Center (GDH)*

*Zefat Academic College , Department of Information System  *
Home Page:
https://malikyousef.com/
Google Scholar Profile :
https://scholar.google.com/citations?user=9UCZ_q4J=en=ao

___
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn