When running feature selection with LinearSVC for some data that I have
X_new = LinearSVC(C=0.01, penalty="l1", dual=False).fit_transform(X, y)

I get:
Invalid threshold: all features are discarded.

Even though the rfecv and anova methods work fine.

According to the documentation:
"Threshold takes the value None by default. If None and if available, the
object attribute threshold is used. Otherwise, “mean” is used by default"

Which object is the documentation referring to in the context of my example
above?  And why do I get invalid threshold in my case?

Finally, is there a way to know which specific features (columns) were
discarded? Does the method give a score per feature? or does it just make
binary decisions on which feature are filtered in vs out?

Sorry I have so many questions about LinearSVC. I wonder if it would be
useful to collect Q&A in some place.

Thanks,

Josh
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to