OrdinalClassifierBase<T>
Base Classes · AiDotNet.Classification.Ordinal
Base class for ordinal classification models.
Inheritance: ClassifierBase<T> → OrdinalClassifierBase<T>
Implements: IOrdinalClassifier<T>
Known derived types: OrdinalLogisticRegression<T>, OrdinalRidgeRegression<T>
For Beginners
Ordinal classification (also called ordinal regression) is used when your target variable has a natural order. Examples include:
- Star ratings (1, 2, 3, 4, 5 stars)
- Education levels (High School, Bachelor’s, Master’s, PhD)
- Disease severity (Mild, Moderate, Severe)
- Likert scale responses (Strongly Disagree to Strongly Agree)
How It Works
Unlike regular classification where all misclassifications are equally bad, in ordinal classification being “close” to the true class is better than being far away. Predicting 4 stars when the truth is 5 stars is a smaller error than predicting 1 star.
Properties
| Property | Summary |
|---|---|
Vector<T> OrderedClasses { get; } |
Gets the ordered class labels. |
Methods
| Method | Summary |
|---|---|
Matrix<T> PredictCumulativeProbabilities(Matrix<T> features) |
Predicts cumulative probabilities P(Y ≤ k) for each class threshold. |
Matrix<T> PredictProbabilities(Matrix<T> features) |
Predicts class probabilities for each ordinal class. |