Your analysis is correct: https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_stacking.py#L59
It will be the prediction of each learner in the order in the list given and finally the features which are pass-through. It would nice when we will be able to propagate feature names :) On Tue, 5 May 2020 at 14:31, Andrew Howe <ahow...@gmail.com> wrote: > Hi All - gentle nudge in case anybody has an idea about this. > > Andrew > > <~~~~~~~~~~~~~~~~~~~~~~~~~~~> > J. Andrew Howe, PhD > LinkedIn Profile <http://www.linkedin.com/in/ahowe42> > ResearchGate Profile <http://www.researchgate.net/profile/John_Howe12/> > Open Researcher and Contributor ID (ORCID) > <http://orcid.org/0000-0002-3553-1990> > Github Profile <http://github.com/ahowe42> > Personal Website <http://www.andrewhowe.com> > I live to learn, so I can learn to live. - me > <~~~~~~~~~~~~~~~~~~~~~~~~~~~> > > > ---------- Forwarded message --------- > From: Andrew Howe <ahow...@gmail.com> > Date: Thu, Apr 30, 2020 at 6:05 PM > Subject: StackingClassifier > To: Scikit-learn user and developer mailing list <scikit-learn@python.org> > > > Hi All > > Quick question about the stacking classifier > <https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.StackingClassifier.html>. > 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): > > passThrough = True > finalEstim = DecisionTreeClassifier(random_state=42) > stkClas = StackingClassifier(estimators=[('Logistic Regression', LGRG), > ('Kernel SVM', KSVM)], > cv=crossValInput, passthrough=passThrough, > final_estimator=finalEstim, > n_jobs=-1) > > Given this setup, I *think* the features input to the final estimator are > > - Logistic regression prediction probabilities for all classes > - Kernel SVM prediction probabilities for all classes > - original features of data passed into the stacking classifier > > 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. > > Thanks! > Andrew > > <~~~~~~~~~~~~~~~~~~~~~~~~~~~> > J. Andrew Howe, PhD > LinkedIn Profile <http://www.linkedin.com/in/ahowe42> > ResearchGate Profile <http://www.researchgate.net/profile/John_Howe12/> > Open Researcher and Contributor ID (ORCID) > <http://orcid.org/0000-0002-3553-1990> > Github Profile <http://github.com/ahowe42> > Personal Website <http://www.andrewhowe.com> > I live to learn, so I can learn to live. - me > <~~~~~~~~~~~~~~~~~~~~~~~~~~~> > _______________________________________________ > scikit-learn mailing list > scikit-learn@python.org > https://mail.python.org/mailman/listinfo/scikit-learn > -- Guillaume Lemaitre Scikit-learn @ Inria Foundation https://glemaitre.github.io/
_______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn