<div dir="ltr">Thanks for your reply.<div>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?</div><div><br></div><div>Malik<br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>---------------------------------------------------------------------------------------</div>
<div><span style="color:rgb(102,102,204)"><b><font face="comic sans ms, sans-serif">Prof. Malik Yousef , Associate Professor                           </font></b></span></div><div><font color="#000099" face="comic sans ms, sans-serif"><b>Zefat Academic College , Department of Information System  </b></font></div><div>Home Page:</div><div><a href="https://malikyousef.com/" target="_blank">https://malikyousef.com/</a><br></div><div><span style="font-size:12.8px">Google Scholar Profile :</span><br></div><div><a href="https://scholar.google.com/citations?user=9UCZ_q4AAAAJ&hl=en&oi=ao" target="_blank">https://scholar.google.com/citations?user=9UCZ_q4AAAAJ&hl=en&oi=ao</a></div><div>----------------------------------------------------------------------------------------------------<br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 1, 2019 at 8:43 PM Joel Nothman <<a href="mailto:joel.nothman@gmail.com">joel.nothman@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Or use scoring=make_scorer(f1_score, pos_label='n.pre')</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 2 Aug 2019 at 06:15, Malik Yousef <<a href="mailto:malik.yousef@gmail.com" target="_blank">malik.yousef@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello<div>When in using the scoring to be 'f1' then i get an error.</div><div>Here is the code and the error</div><div><br></div><div>X=data<br>y=target_column<br>classifier = LinearSVC()<br>rfecv = RFECV(estimator=classifier, step=0.1, cv=StratifiedKFold(5),scoring='f1')</div><div>rfecv.fit(X, y)</div><div><br></div><div>The error is :</div><div>ValueError: pos_label=1 is not a valid label: array([u'c.pre', u'n.pre'], dtype='<U5')</div><div><br></div><div>Please your help</div><div>(I'm new to using scikit-leanr)<br clear="all"><div><div dir="ltr" class="gmail-m_-3418573779463646416gmail-m_6623308431255615453gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>---------------------------------------------------------------------------------------</div>
<div><span style="color:rgb(102,102,204)"><b><font face="comic sans ms, sans-serif">Prof. Malik Yousef , Associate Professor                           </font></b></span></div><div><font color="#000099" face="comic sans ms, sans-serif"><b>Zefat Academic College , Department of Information System  </b></font></div><div>Home Page:</div><div><a href="https://malikyousef.com/" target="_blank">https://malikyousef.com/</a><br></div><div><span style="font-size:12.8px">Google Scholar Profile :</span><br></div><div><a href="https://scholar.google.com/citations?user=9UCZ_q4AAAAJ&hl=en&oi=ao" target="_blank">https://scholar.google.com/citations?user=9UCZ_q4AAAAJ&hl=en&oi=ao</a></div><div>----------------------------------------------------------------------------------------------------<br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
scikit-learn mailing list<br>
<a href="mailto:scikit-learn@python.org" target="_blank">scikit-learn@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scikit-learn" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/scikit-learn</a><br>
</blockquote></div>
_______________________________________________<br>
scikit-learn mailing list<br>
<a href="mailto:scikit-learn@python.org" target="_blank">scikit-learn@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scikit-learn" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/scikit-learn</a><br>
</blockquote></div>