BudgetConstrainedFS<T>
Models & Types · AiDotNet.Preprocessing.FeatureSelection.CostSensitive
Budget-Constrained Feature Selection with a maximum cost budget.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> → BudgetConstrainedFS<T>
Implements: ISupervisedFeatureSelector<T>
For Beginners
Imagine you have $100 to spend on data collection. This selector picks the most valuable features you can afford within your budget. It’s like a knapsack problem - get the most value without exceeding your limit.
How It Works
Budget-Constrained Feature Selection selects the most informative features while staying within a specified cost budget. It uses a greedy approach to maximize value per unit cost.
Constructors
| Constructor | Summary |
|---|---|
BudgetConstrainedFS(double budget, Vector<T> featureCosts, int[] columnIndices) |
Properties
| Property | Summary |
|---|---|
T UsedBudget { get; } |
|
Vector<T> FeatureCosts { get; } |
|
Vector<T> RelevanceScores { get; } |
|
Vector<T> ValuePerCost { get; } |
|
bool SupportsInverseTransform { get; } |
|
double Budget { get; } |
|
int[] SelectedIndices { get; } |
Methods
| Method | Summary |
|---|---|
Matrix<T> FitTransform(Matrix<T> data, Vector<T> target) |
|
T GetRemainingBudget() |
|
bool[] GetSupportMask() |
|
string[] GetFeatureNamesOut(string[] inputFeatureNames) |
|
void Fit(Matrix<T> data, Vector<T> target) |
|
void Fit(Matrix<T> data, Vector<T> target, Vector<T> featureCosts) |