NoRegularization<T, TInput, TOutput>
Models & Types · AiDotNet.Regularization
Implements a no-op regularization class that applies no regularization penalty to the model.
Inheritance: RegularizationBase<T, TInput, TOutput> → NoRegularization<T, TInput, TOutput>
For Beginners
This class essentially turns off regularization.
Think of regularization as optional guardrails that keep your model from becoming too complex:
- L1 and L2 regularization add these guardrails
- NoRegularization removes all guardrails
- Your model is free to find the exact fit to your training data
For example:
- When using NoRegularization, your model can assign very large coefficients to features
- Nothing prevents the model from perfectly memorizing your training data
- This can be good for very simple problems or when you have a lot of data relative to features
You might use NoRegularization when:
- You’re confident your model won’t overfit
- You want to see how your model performs without regularization
- You’re using other techniques to prevent overfitting (like early stopping)
How It Works
NoRegularization serves as a baseline implementation that passes through all values unchanged. This class is useful when a regularization object is required by the architecture but you don’t want to apply any actual regularization to your model.
Constructors
| Constructor | Summary |
|---|---|
NoRegularization() |
Initializes a new instance of the NoRegularization class. |
Methods
| Method | Summary |
|---|---|
Matrix<T> Regularize(Matrix<T> data) |
Returns the output data or coefficients unchanged, applying no regularization. |
TOutput Regularize(TOutput gradient, TOutput coefficients) |
|
Vector<T> Regularize(Vector<T> data) |
Returns the output data or coefficients unchanged, applying no regularization. |
Vector<T> Regularize(Vector<T> gradient, Vector<T> coefficients) |