marcotcr / lime

Lime: Explaining the predictions of any machine learning classifier
BSD 2-Clause "Simplified" License
11.5k stars 1.79k forks source link

Tutorial Needs to be updated - SKLearn Issue #558

Closed elsharifali closed 3 years ago

elsharifali commented 3 years ago

Tutorial - continuous and categorical features need to be updated The following line generates an error: encoder = sklearn.preprocessing.OneHotEncoder(categorical_features=categorical_features)

TypeError Traceback (most recent call last)

in ----> 1 encoder = sklearn.preprocessing.OneHotEncoder(categorical_features=categorical_features) 2 # encoder = sklearn.preprocessing.OneHotEncoder(categorical_features) ~/anaconda3/lib/python3.7/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs) 70 FutureWarning) 71 kwargs.update({k: arg for k, arg in zip(sig.parameters, args)}) ---> 72 return f(**kwargs) 73 return inner_f 74 TypeError: __init__() got an unexpected keyword argument 'categorical_features' This seems like an issue with SKLearn OneHotEncoder being changed
marcotcr commented 3 years ago

thanks, 415d18e8139509a50b8f7482e92d5b0557d8c3cc