我正在编写一个使用ColumnTransformer和LabelEncoder对著名的泰坦尼克号数据集X进行预处理的示例。/site-packages/sklearn/compose/_column_transformer.py in _fit_transform(self, X, y, func, fitted):
616 res = transformer.fit(X, y, **fit</em
这是一个很小的数据帧,其中包含我需要编码的一小部分数据。我目前的工作是使用SciKit-Learns LabelEncoder(),le.fit(["local", "animals",问题是LabelEncoder接受的参数是这样的。le.transform(["local"]) #For the first row in
我正在构建一个使用定制变压器()的模型。,
~/opt/anaconda3/lib/python3.8/site-packages/sklearn/pipeline.py in fit_transform(self, X, y, **fit_params.fit_transform,但是我得到了同样的错误。我读过这样的文章:,但看起来我并没有像在这个例子中