feature-selector
feature-selector copied to clipboard
y contains previously unseen labels: "value"
I have a multi-class problem where some of class values only appears in a few register, so when i run this module i got this error.
fs = FeatureSelector(data = data, labels = labels)
fs.identify_all(selection_params = {'missing_threshold': 0.9, 'correlation_threshold': 0.99, 'task': 'classification', 'eval_metric': 'multiclass', 'cumulative_importance': 1})
ValueError: y contains previously unseen labels: 'myClassValue'
seems it only happens when early stopping is activated
maybe a workaround is change line 306 of feature_selector to
train_features, valid_features, train_labels, valid_labels = train_test_split(features, labels, test_size = 0.15, stratify=labels)