[scikit-learn] Fwd: StackingClassifier

Andrew Howe ahowe42 at gmail.com
Tue May 5 08:29:18 EDT 2020


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 <ahowe42 at gmail.com>
Date: Thu, Apr 30, 2020 at 6:05 PM
Subject: StackingClassifier
To: Scikit-learn user and developer mailing list <scikit-learn at 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
<~~~~~~~~~~~~~~~~~~~~~~~~~~~>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20200505/b4adfa2c/attachment.html>


More information about the scikit-learn mailing list