fit_transform() takes 2 positional arguments but 3 were given with LabelBinarizer

前端 未结 13 1938
时光取名叫无心
时光取名叫无心 2020-12-07 16:35

I am totally new to Machine Learning and I have been working with unsupervised learning technique.

Image shows my sample Data(After all Cleaning) Screenshot : Sample

13条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-07 16:52

    I got the same issue, and got resolved by using DataFrameMapper (need to install sklearn_pandas):

    from sklearn_pandas import DataFrameMapper
    cat_pipeline = Pipeline([
        ('label_binarizer', DataFrameMapper([(cat_attribs, LabelBinarizer())])),
    ])
    

提交回复
热议问题