Invalid parameter for sklearn estimator pipeline

前端 未结 2 558
不知归路
不知归路 2021-02-03 22:03

I am implementing an example from the O\'Reilly book \"Introduction to Machine Learning with Python\", using Python 2.7 and sklearn 0.16.

The code I am using:

2条回答
  •  一生所求
    2021-02-03 22:27

    There should be two underscores between estimator name and it's parameters in a Pipeline logisticregression__C. Do the same for tfidfvectorizer

    See the example at http://scikit-learn.org/stable/auto_examples/plot_compare_reduction.html#sphx-glr-auto-examples-plot-compare-reduction-py

提交回复
热议问题