Re: [scikit-learn] SVM-RFE

2019-12-04 Thread Brown J.B. via scikit-learn
I certainly am guilty of only commenting in the mailing list and not engaging more via GitHub! :) (Much like many of you PIs on this list, the typical ActualWork-GrantWriting-ReportWriting-InvitedLectures-RealLifeParenting cycle eats the day away.) While I've failed previously to get involved afte

Re: [scikit-learn] SVM-RFE

2019-12-04 Thread Andreas Mueller
PR welcome ;) On 12/3/19 11:02 PM, Brown J.B. via scikit-learn wrote: 2019年12月3日(火) 5:36 Andreas Mueller >: It does provide the ranking of features in the ranking_ attribute and it provides the cross-validation accuracies for all subsets in grid_scores_.

Re: [scikit-learn] SVM-RFE

2019-12-03 Thread Brown J.B. via scikit-learn
2019年12月3日(火) 5:36 Andreas Mueller : > It does provide the ranking of features in the ranking_ attribute and it > provides the cross-validation accuracies for all subsets in grid_scores_. > It doesn't provide the feature weights for all subsets, but that's > something that would be easy to add if

Re: [scikit-learn] SVM-RFE

2019-12-02 Thread Andreas Mueller
It does provide the ranking of features in the ranking_ attribute and it provides the cross-validation accuracies for all subsets in grid_scores_. It doesn't provide the feature weights for all subsets, but that's something that would be easy to add if it's desired. On 11/25/19 10:50 AM, Mali

Re: [scikit-learn] SVM-RFE

2019-11-25 Thread Malik Yousef
It does not provide access for tracing the step by step feature weights and predictive ability- The user provides the n_feature. Malik --- *Prof. Malik Yousef (Associate Professor) * *The Head of the** Galilee Di

Re: [scikit-learn] SVM-RFE

2019-11-25 Thread Brown J.B. via scikit-learn
2019年11月23日(土) 2:12 Andreas Mueller : > I think you can also use RFECV directly without doing any wrapping. > > Your request to do performance checking of the steps of SVM-RFE is a > pretty common task. > > Yes, RFECV works well (and I should know as an appreciative long-time user ;-) ), but does

Re: [scikit-learn] SVM-RFE

2019-11-22 Thread Andreas Mueller
I think you can also use RFECV directly without doing any wrapping. On 11/20/19 12:24 AM, Brown J.B. via scikit-learn wrote: 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 th

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

[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 fea

Re: [scikit-learn] SVM-RFE with scoring = 'f1'

2019-08-23 Thread Malik Yousef
Thanks for your reply. How I can set the name of the positive class in LinearSVC() for a two-class problem that when using the prediction then I will get positive scores fro that positive class? Malik --- *Prof. Ma

Re: [scikit-learn] SVM-RFE with scoring = 'f1'

2019-08-01 Thread Joel Nothman
Or use scoring=make_scorer(f1_score, pos_label='n.pre') On Fri, 2 Aug 2019 at 06:15, Malik Yousef wrote: > Hello > When in using the scoring to be 'f1' then i get an error. > Here is the code and the error > > X=data > y=target_column > classifier = LinearSVC() > rfecv = RFECV(estimator=classifi

Re: [scikit-learn] SVM-RFE with scoring = 'f1'

2019-08-01 Thread Guillaume Lemaître
@python.orgReply to: scikit-learn@python.orgSubject: Re: [scikit-learn] SVM-RFE with scoring = 'f1' Can you give me an example?--- Prof. Malik Yousef , Associate Professor                           Zefa

Re: [scikit-learn] SVM-RFE with scoring = 'f1'

2019-08-01 Thread Malik Yousef
Can you give me an example? --- *Prof. Malik Yousef , Associate Professor * *Zefat Academic College , Department of Information System * Home Page: https://malikyousef.com/ Google Scholar

Re: [scikit-learn] SVM-RFE with scoring = 'f1'

2019-08-01 Thread Guillaume Lemaître
you can use the LabelEncoder then. It will encode the classes for you. On Thu, 1 Aug 2019 at 23:04, Malik Yousef wrote: > The only string column is the label column(class labels, n.pre, and > c.pre). if the scoring = 'accuracy' then it works fine. > So I think I need somehow to set up the postiv

Re: [scikit-learn] SVM-RFE with scoring = 'f1'

2019-08-01 Thread Malik Yousef
The only string column is the label column(class labels, n.pre, and c.pre). if the scoring = 'accuracy' then it works fine. So I think I need somehow to set up the postive_lable.. that I don't know how to do that.

Re: [scikit-learn] SVM-RFE with scoring = 'f1'

2019-08-01 Thread Guillaume Lemaître
It looks like your data contains string. You need to make some preprocessing before to give it the linear model. On Thu, 1 Aug 2019 at 22:16, Malik Yousef wrote: > Hello > When in using the scoring to be 'f1' then i get an error. > Here is the code and the error > > X=data > y=target_column > cl

[scikit-learn] SVM-RFE with scoring = 'f1'

2019-08-01 Thread Malik Yousef
Hello When in using the scoring to be 'f1' then i get an error. Here is the code and the error X=data y=target_column classifier = LinearSVC() rfecv = RFECV(estimator=classifier, step=0.1, cv=StratifiedKFold(5),scoring='f1') rfecv.fit(X, y) The error is : ValueError: pos_label=1 is not a valid la