My first principal component is almost entirely one feature (salary). Is PCA broken?
Loading page content…

Find answers to your programming questions.
My first principal component is almost entirely one feature (salary). Is PCA broken?
I'm using PCA(ncomponents=2) because every tutorial does, but I don't know how many components I actually need for my model.
scikit-learn has several feature selection tools. When should I use each one?
fclassif prints warnings about constant features and some scores are NaN. Other times I get an error about NaN in the input.
My grid search fails for some values of k.
I run the same code twice and get a different set of selected features. Why aren't the results reproducible?
After one-hot encoding inside a ColumnTransformer, I can't map the selector's output back to the original feature names.
My dataset has columns like 'city' and 'gender'. SelectKBest crashes on them.