FitnessCalculatorType
Enums · AiDotNet.Enums
Specifies different loss functions and fitness calculators for evaluating model performance.
For Beginners
Loss functions and fitness calculators measure how well your AI model’s predictions match the actual data.
Think of these metrics like grades on a test:
- They tell you how well your model is performing
- Different metrics focus on different aspects of performance
- For most loss functions, lower values mean better performance
- For some metrics (like R-squared), higher values mean better performance
When building AI models, you need ways to:
- Compare different models to choose the best one
- Know when to stop training your model
- Understand if your model is actually learning useful patterns
- Detect if your model is overfitting (memorizing data instead of learning)
Different metrics are better for different situations, so it’s common to look at multiple metrics when evaluating a model.
Fields
| Field | Summary |
|---|---|
FitnessCalculatorType AdjustedRSquared |
A modified version of R-squared that adjusts for the number of predictors in the model. |
FitnessCalculatorType BinaryCrossEntropy |
Measures the cross-entropy loss for binary classification problems. |
FitnessCalculatorType CategoricalCrossEntropy |
Measures the cross-entropy loss for multi-class classification problems. |
FitnessCalculatorType Custom |
A custom loss function or fitness calculator defined by the user. |
FitnessCalculatorType ExponentialLoss |
Calculates the exponential loss, which heavily penalizes large errors. |
FitnessCalculatorType HuberLoss |
Calculates the Huber loss, which combines properties of MSE and MAE. |
FitnessCalculatorType LogCosh |
Calculates the logarithm of the hyperbolic cosine of the prediction error. |
FitnessCalculatorType MaxError |
Measures the maximum deviation between predicted and actual values. |
FitnessCalculatorType MeanAbsoluteError |
Calculates the average of the absolute differences between predicted and actual values. |
FitnessCalculatorType MeanAbsolutePercentageError |
Measures the mean absolute percentage error. |
FitnessCalculatorType MeanSquaredError |
Calculates the average of the squared differences between predicted and actual values. |
FitnessCalculatorType MeanSquaredLogError |
Calculates the mean squared logarithmic error. |
FitnessCalculatorType MedianAbsoluteError |
Measures the median absolute error between predicted and actual values. |
FitnessCalculatorType OrdinalRegressionLoss |
A loss function specifically designed for ordinal regression problems. |
FitnessCalculatorType RSquared |
Measures the proportion of variance in the dependent variable explained by the independent variables. |
FitnessCalculatorType RootMeanSquaredError |
Calculates the root mean squared error. |
int value__ |