【发布时间】:2020-10-28 16:09:24
【问题描述】:
在下面给出的代码中,我正在为特征工程实现 autofeat 库。但是当我在google colab中运行代码时,它给出了一个错误,如下所述。
import autofeat as af
from sklearn.datasets import load_boston
data = load_boston()
x = data.data
y= data.target
clf = af.AutoFeatRegressor(x,y)
clf.fit_transform(x,y)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-6-7f5a5bb453d3> in <module>()
5 y= data.target
6 clf = af.AutoFeatRegressor(x,y)
----> 7 clf.fit_transform(x,y)
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
【问题讨论】:
标签: python numpy scikit-learn feature-engineering