You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of Enhancement :
BaseModel during self._fetch_meta() selects categorical based on if the column dtype is 'object'. This is typically acceptable and would cover 95% of use cases but the inbuilt pandas dtype categorical would be missed by this . I propose we add categorical_feature parameter to our fit methods like in LGBM's fit method : categorical_feature (list of str or int, or 'auto', optional (default='auto'))(https://lightgbm.readthedocs.io/en/latest/pythonapi/lightgbm.LGBMClassifier.html#lightgbm.LGBMClassifier.fit)
How to reproduce:
from xplainable.core.models import XClassifier
from sklearn.datasets import make_classification
import numpy as np
X, y = make_classification(n_samples=1000,n_features=4,random_state=42,n_classes=2)
X = pd.DataFrame(X,columns=['Feat_'+str(i) for i in range(4)])
y = pd.Series(y)
X['Feat_0'] = X['Feat_0'].astype('category')
print(list(X.select_dtypes('object')))
Screenshot
The text was updated successfully, but these errors were encountered:
Description of Enhancement :
BaseModel during self._fetch_meta() selects categorical based on if the column dtype is 'object'. This is typically acceptable and would cover 95% of use cases but the inbuilt pandas dtype categorical would be missed by this . I propose we add categorical_feature parameter to our fit methods like in LGBM's fit method : categorical_feature (list of str or int, or 'auto', optional (default='auto'))(https://lightgbm.readthedocs.io/en/latest/pythonapi/lightgbm.LGBMClassifier.html#lightgbm.LGBMClassifier.fit)
How to reproduce:
Screenshot
The text was updated successfully, but these errors were encountered: