I'm trying to build simple pipeline:
from sklearn.linear_model import Lasso
from sklearn.preprocessing import PolynomialFeatures
from sklearn.pipeline import make_pipeline
make_pipeline([
('PolynomialFeatures', PolynomialFeatures(include_bias=False)),
('Lasso', Lasso(fit_intercept=True, max_iter=1000))])
And I'm getting error:
TypeError: Last step of Pipeline should implement fit or be the string 'passthrough'. '[('PolynomialFeatures', PolynomialFeatures(include_bias=False)), ('Lasso', Lasso())]' (type <class 'list'>) doesn't
What is wrong ? How can I fix it ?