<div dir="ltr">Thank you for your e-mail.<div><br></div><div>I am not looking for class prediction, as I am using similar concept to recognize them.</div><div>Exactly I am looking for the text which points to the class as identified by the model.</div><div><br></div><div><br></div><div>"Humpty Dumpty sat on the wall" </div><div><br></div><div>when above statement fed to the pre-trained/saved model it returns the class output as "Character".<br></div><div><br></div><div>Also I want the text part which trained for that respective class. Assuming "Humpty Dumpty" is trained under "Character" class.</div><div><br></div><div>Thank you,</div><div><br></div><div>Best regards</div><div><br></div><div><br></div><div> </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 13 Aug 2019 at 13:21, Guillaume Lemaître <<a href="mailto:g.lemaitre58@gmail.com">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>I am unsure if it what you need but you can take the argmax (or call predict) and get the value of model.classes_.</div><div>In short, model.classes_[model.predict([invoice_parameter])].<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 13 Aug 2019 at 09:01, Gunasekar K <<a href="mailto:imguna2003@gmail.com" target="_blank">imguna2003@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">Hi Team,<div><br></div><div>Greetings!!!</div><div><br></div><div>Assuming ''Humpty Dumpty" is text trained under given specific model belonging to class called "cartoon character" in multi-text classification model.</div><div><br></div><div><b>model.predict_proba([Invoice_parameter])*100</b> gives the probability of belongings to specific class.<br></div><div><br></div><div>But how come I can retrieve the <b>text</b> for that probability hit for that class.</div><div><br></div><div>for example,</div><div><br></div><div>Invoice_parameter= input() ---- on the fly input</div><div><br></div><div>"Humpty Dumpty sat on the wall"</div><div><br></div><div><b>model.predict_proba([Invoice_parameter])*100</b>  <br></div><div><br></div><div>I get probability of 99.09 (rounded to two decimal places) to character class but i also need to retrieve the text  Humpty Dumpty.</div><div><br></div><div>Any help or suggestions are appreciated.</div><div><br></div><div>Thanks in advance.</div><div><br></div><div>Kind regards,</div><div>GK</div><div><br></div><div><br></div><div><br></div><div><br></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_6194611739708413766gmail_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>