Reputation: 4031
I am trying to use sklearn univariate feature selection to filter out irrelevant features:
ufs = feature_selection.SelectPercentile(feature_selection.f_classif, percentile = 60)
X_default_cvtrain = ufs.fit_transform( X_cvtrain, Y_cvtrain )
However, I get this warning:
UserWarning: Duplicate scores. Result may depend on feature ordering.
There are probably duplicate features, or you used a classification score for a regression task.
warn("Duplicate scores. Result may depend on feature ordering."
What does it mean? What is going on here?
Thanks.
Upvotes: 3
Views: 1571
Reputation: 28748
It means that there are duplicate scores, so the selected features depend on the feature ordering. A probable cause is that you have duplicate features.
Upvotes: 5