Pardon if this question is very basic, but I am not able to find any solution for my problem. I am trying to run a feature selection scheme on N features for my classification model, however I want one of these features to always appear in the model. Is there a way to run feature selection on the remaining N-1 variables?

The feature I want to retain is categorical.


It depends on the feature selection routine you choose to use. Matlab's sequentialfs, a wrapper based sequential feature selection routine, allows you to force a given feature to remain in the feature set with the keepin input parameter. I am sure R or equivalent languages also offer equivalent functionality.

| cite | improve this answer | |
  • $\begingroup$ The penalized R package offers similar option (see argument unpenalized=), although it deals with L1/L2 penalization schemes, and not FS per se. $\endgroup$ – chl Mar 12 '14 at 10:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.