Open VondracekS opened 1 year ago
Hello,
In my case I had no problem but I just checked and I have 2 different packages (category-encoders, category_encoders) , both are version 2.6.0
I hope it helps you on something
I added this function at 242
self._encoded_categorical_features = copy.deepcopy(
self.feature_config.categorical_features
)
**def get_feature_names(self, input_features=None):
if input_features is None:
return self.columns
else:
return input_features**
def fit(
self,
Also I change 291 to the following:
), f"These categorical features are not handled by the categorical_encoder : {missing_cat_cols}"
X = self._cat_encoder.fit_transform(X, y)
X_encoded = self._cat_encoder.fit_transform(X, y)
**self._encoded_categorical_features = [col for col in X_encoded.columns if col not in self.feature_config.continuous_features + self.feature_config.boolean_features]
else:
self._encoded_categorical_features = []
Hello,
In my case I had no problem but I just checked and I have 2 different packages (category-encoders, category_encoders) , both are version 2.6.0
I hope it helps you on something
Hi. Thanks for the comment, however I do not think these are 2 separate packages. The category-encoders is name of the package on pip server while category_encoders is the name you use when importing the package in python
I can fix this error by simply running following commands, python -m pip install --upgrade scikit-learn & pip install -U scikit-learn python -m pip install --upgrade category_encoders & pip install -U category_encoders
Hi, when running the notebook 01 for the Global Forecasting Models, I keep getting the following error: AttributeError: 'CountEncoder' object has no attribute 'get_feature_names'
I have noticed that in the requirements, category_encoders package is listed without a specific version. When searching through its documentation, I haven't found the ._get_featurenames method (I guess it might have been replaced by ._get_feature_namesin() and ._get_feature_namesout(), see here I've been trying to fix the _\src\forecasting\mlforecasting.py module, however didn't get the code to work. Maybe providing a specific version of the category_encoders package you are using should suffice. Thanks
Traceback here: