flennerhag / mlens

ML-Ensemble – high performance ensemble learning
http://ml-ensemble.com
MIT License
843 stars 108 forks source link

AttributeError While Following Tutorial #118

Closed meaningfromdata closed 5 years ago

meaningfromdata commented 5 years ago

I'm running into an AttributeError while trying to follow the "Getting Started" tutorial (http://ml-ensemble.com/info/tutorials/start.html). I added RandomForestClassifier and SVC to the first layer and added LogisticRegression to the meta layer per the tutorial. However, I am getting the following AttributeError when I run ensemble.fit(X[:75], y[:75]):

"AttributeError: 'SVC' object has no attribute 'transform'"

This also happens with LogisticRegression if I swap LogisticRegression for SVC in the first layer.

I am running mlens version 0.2.3 and sklearn version 0.20.0

flennerhag commented 5 years ago

Hi, I can't replicate this error, the tutorial is running fine for me. Could you provide an mwe reproducing the error?

meaningfromdata commented 5 years ago

Sorry, I just found the error. I missed the list [] enclosing [RandomForestClassifier(), SVC()].

However, now I am getting another AttributeError when I execute ensemble.scores_. The error states that "SuperLearner has no attribute scores". Any suggestions?

flennerhag commented 5 years ago

Great! :) There is no attribute ensemble.scores_, use ensemble.data instead.