# Feature selection while retaining a specified feature

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.
• The penalized R package offers similar option (see argument unpenalized=), although it deals with L1/L2 penalization schemes, and not FS per se. – chl Mar 12 '14 at 10:58