MCP<T>

Models & Types · AiDotNet.Preprocessing.FeatureSelection.Embedded

Minimax Concave Penalty (MCP) for feature selection.

Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> → MCP<T>

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

MCP is like LASSO but smarter about large coefficients. LASSO shrinks everything, even important features. MCP says “if a coefficient is big enough, stop penalizing it” - so truly important features keep their full effect while unimportant ones are still shrunk to zero.

How It Works

MCP is a non-convex penalty that provides an unbiased selection of significant variables while controlling model complexity. Unlike LASSO, MCP does not over-penalize large coefficients, providing nearly unbiased estimates for important features.

Constructors

Constructor Summary
MCP(int nFeaturesToSelect, double lambda, double gamma, int maxIterations, double tolerance, int[] columnIndices)

Properties

Property Summary
Vector<T> Coefficients { get; }
bool SupportsInverseTransform { get; }
double Gamma { get; }
double Lambda { get; }
int NFeaturesToSelect { get; }
int[] SelectedIndices { get; }

Methods

Method Summary
Matrix<T> FitTransform(Matrix<T> data, Vector<T> target)
bool[] GetSupportMask()
string[] GetFeatureNamesOut(string[] inputFeatureNames)
void Fit(Matrix<T> data, Vector<T> target)