SineCosine<T>

Models & Types ยท AiDotNet.Preprocessing.FeatureSelection.Metaheuristic

Sine Cosine Algorithm (SCA) for feature selection.

Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> โ†’ SineCosine<T>

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

Imagine solutions swinging back and forth around the best known answer, like a pendulum. Early on, the swings are big (exploring widely), but they get smaller over time (focusing on the best area). The sine and cosine functions create this natural oscillating behavior.

How It Works

The Sine Cosine Algorithm uses sine and cosine functions to create a mathematical model for optimization. Agents oscillate around the best solution, with the oscillation range decreasing over iterations.

Constructors

Constructor Summary
SineCosine(int nFeaturesToSelect, int populationSize, int nIterations, double a, int? randomState, int[] columnIndices)

Properties

Property Summary
Vector<T> FeatureScores { get; }
bool SupportsInverseTransform { get; }
double Amplitude { get; }
int NFeaturesToSelect { get; }
int NIterations { get; }
int PopulationSize { 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)