LinearClassifierOptions<T>
Options & Configuration · AiDotNet.Models.Options
Configuration options for linear classifiers.
Inheritance: ModelOptions → ClassifierOptions<T> → LinearClassifierOptions<T>
Known derived types: PassiveAggressiveOptions<T>
For Beginners
Linear classifiers draw a straight line (or hyperplane in higher dimensions) to separate different classes of data.
Key concepts:
- They learn weights for each feature
- Prediction is: sign(weight * features + bias)
- Training adjusts weights to minimize errors
Linear classifiers are great when:
- You have many features (high-dimensional data)
- Data is approximately linearly separable
- You need fast training and prediction
- You want interpretable models (feature importance = weight magnitude)
How It Works
Linear classifiers learn a linear decision boundary to separate classes. They are simple, interpretable, and often very effective.
Constructors
| Constructor | Summary |
|---|---|
LinearClassifierOptions() |
Properties
| Property | Summary |
|---|---|
LinearLoss Loss { get; set; } |
Gets or sets the loss function type. |
LinearPenalty Penalty { get; set; } |
Gets or sets the penalty type for regularization. |
bool FitIntercept { get; set; } |
Gets or sets whether to fit an intercept term (bias). |
bool Shuffle { get; set; } |
Gets or sets whether to shuffle training data at each epoch. |
double Alpha { get; set; } |
Gets or sets the regularization strength (alpha). |
double LearningRate { get; set; } |
Gets or sets the learning rate for gradient-based optimization. |
double Tolerance { get; set; } |
Gets or sets the convergence tolerance. |
int MaxIterations { get; set; } |
Gets or sets the maximum number of training iterations. |