<div dir="ltr">you can use the LabelEncoder then. It will encode the classes for you.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 1 Aug 2019 at 23:04, Malik Yousef <<a href="mailto:malik.yousef@gmail.com">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">The only string column is the label column(class labels, n.pre, and c.pre). if the scoring = 'accuracy' then it works fine.<div>So I think I need somehow to set up the postive_lable.. that I don't know how to do that.</div><div><br clear="all"><div><div dir="ltr" class="gmail-m_6684594150908648719gmail_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 face="comic sans ms, sans-serif" color="#000099"><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 4:58 PM Guillaume Lemaître <<a href="mailto:g.lemaitre58@gmail.com" target="_blank">g.lemaitre58@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"><div>It looks like your data contains string. You need to make some preprocessing before to give it the linear model.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 1 Aug 2019 at 22:16, 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_6684594150908648719gmail-m_4958583247259797468gmail-m_6094536081170273734gmail_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 face="comic sans ms, sans-serif" color="#000099"><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 clear="all"><br>-- <br><div dir="ltr" class="gmail-m_6684594150908648719gmail-m_4958583247259797468gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>Guillaume Lemaitre<br>INRIA Saclay - Parietal team<br>Center for Data Science Paris-Saclay<br><a href="https://glemaitre.github.io/" target="_blank">https://glemaitre.github.io/</a></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><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>Guillaume Lemaitre<br>INRIA Saclay - Parietal team<br>Center for Data Science Paris-Saclay<br><a href="https://glemaitre.github.io/" target="_blank">https://glemaitre.github.io/</a></div></div></div></div></div></div></div>