我试图运行线性回归模型,该模型由A Geron使用Scikit Learn和Tensorflow进行了机器学习的第二章。但是我得到了这个Can't import MultiOutputMixin error
。
有人可以帮我这个忙吗?我已经在Azure笔记本(基本上是木笔记本)中编写了代码。
代码如下:
from sklearn.linear_model import LinearRegression,MultiOutputMixin
from sklearn.linear_model.base import MultiOutputMixin
lin_reg=LinearRegression()
lin_reg.fit(housing_prepared,housing_labels)
错误:
_ImportError Traceback (most recent call last)
in
----> 1 from sklearn.linear_model import LinearRegression,MultiOutputMixin
2 from sklearn.linear_model.base import MultiOutputMixin
3
4 lin_reg=LinearRegression()
5
~/anaconda3_501/lib/python3.6/site-packages/sklearn/linear_model/init.py in
10 # complete documentation.
11
---> 12 from .base import LinearRegression
13
14 from .bayes import BayesianRidge, ARDRegression
~/anaconda3_501/lib/python3.6/site-packages/sklearn/linear_model/base.py in
25
26 from ..utils._joblib import Parallel, delayed
---> 27 from ..base import (BaseEstimator, ClassifierMixin, RegressorMixin,
28 MultiOutputMixin)
29 from ..utils import check_array, check_X_y
ImportError: cannot import name 'MultiOutputMixin'_