<div dir="ltr"><div>Your analysis is correct: <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_stacking.py#L59">https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_stacking.py#L59</a></div><div><br></div><div>It will be the prediction of each learner in the order in the list given and finally the features which are pass-through.</div><div><br></div><div>It would nice when we will be able to propagate feature names :)<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 5 May 2020 at 14:31, Andrew Howe <<a href="mailto:ahowe42@gmail.com">ahowe42@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 All - gentle nudge in case anybody has an idea about this.<div><br></div><div>Andrew</div><div><br clear="all"><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><~~~~~~~~~~~~~~~~~~~~~~~~~~~><br>J. Andrew Howe, PhD</div><div dir="ltr"><a href="http://www.linkedin.com/in/ahowe42" target="_blank">LinkedIn Profile</a></div><div><a href="http://www.researchgate.net/profile/John_Howe12/" target="_blank">ResearchGate Profile</a></div><div dir="ltr"><a href="http://orcid.org/0000-0002-3553-1990" target="_blank">Open Researcher and Contributor ID (ORCID)</a></div><div dir="ltr"><a href="http://github.com/ahowe42" target="_blank">Github Profile</a><br><div><a href="http://www.andrewhowe.com" target="_blank">Personal Website</a></div><div>I live to learn, so I can learn to live. - me<br></div><div><~~~~~~~~~~~~~~~~~~~~~~~~~~~></div></div></div></div></div></div></div></div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">---------- Forwarded message ---------<br>From: <strong class="gmail_sendername" dir="auto">Andrew Howe</strong> <span dir="auto"><<a href="mailto:ahowe42@gmail.com" target="_blank">ahowe42@gmail.com</a>></span><br>Date: Thu, Apr 30, 2020 at 6:05 PM<br>Subject: StackingClassifier<br>To: Scikit-learn user and developer mailing list <<a href="mailto:scikit-learn@python.org" target="_blank">scikit-learn@python.org</a>><br></div><br><br><div dir="ltr">Hi All<div><br></div><div>Quick question about the <a href="https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.StackingClassifier.html" target="_blank">stacking classifier</a>. How do I know the order of the features that the final estimator uses? I've got an example which I've created like this (the LGRG and KSVM objects were previously defined, but as they seem they would be):</div><div><br></div><div>passThrough = True</div><div>finalEstim = DecisionTreeClassifier(random_state=42)<br>stkClas = StackingClassifier(estimators=[('Logistic Regression', LGRG), ('Kernel SVM', KSVM)],<br> cv=crossValInput, passthrough=passThrough, final_estimator=finalEstim,<br> n_jobs=-1)</div><div><br></div><div>Given this setup, I <b>think</b> the features input to the final estimator are</div><div><ul><li>Logistic regression prediction probabilities for all classes</li><li>Kernel SVM prediction probabilities for all classes</li><li>original features of data passed into the stacking classifier</li></ul></div><div>I can find no documentation on this, though, and don't know of any relevant attribute on the final estimator. I need this to help interpret the final estimator tree - and specifically to provide feature labels for plot_tree.</div><div><br></div><div>Thanks!</div><div>Andrew</div><div><br clear="all"><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><~~~~~~~~~~~~~~~~~~~~~~~~~~~><br>J. Andrew Howe, PhD</div><div dir="ltr"><a href="http://www.linkedin.com/in/ahowe42" target="_blank">LinkedIn Profile</a></div><div><a href="http://www.researchgate.net/profile/John_Howe12/" target="_blank">ResearchGate Profile</a></div><div dir="ltr"><a href="http://orcid.org/0000-0002-3553-1990" target="_blank">Open Researcher and Contributor ID (ORCID)</a></div><div dir="ltr"><a href="http://github.com/ahowe42" target="_blank">Github Profile</a><br><div><a href="http://www.andrewhowe.com" target="_blank">Personal Website</a></div><div>I live to learn, so I can learn to live. - me<br></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_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><span><div><div>Guillaume Lemaitre<br></div></div><div><span>Scikit-learn @ Inria Foundation</span><br><a href="https://glemaitre.github.io/" target="_blank">https://glemaitre.github.io/</a></div></span></div></div></div></div></div></div></div></div></div></div></div>