LossPropertyAttribute
Attributes · AiDotNet.Attributes
Declares mathematical properties of a loss function for automatic test generation and cataloging.
Inheritance: Attribute → LossPropertyAttribute
Constructors
| Constructor | Summary |
|---|---|
LossPropertyAttribute() |
Properties
| Property | Summary |
|---|---|
LossApiShape ApiShape { get; set; } |
The method signature shape this loss uses for its primary calculation. |
LossTestInputFormat TestInputFormat { get; set; } |
The format of test data that this loss function expects. |
OutputType ExpectedOutput { get; set; } |
Expected output format. |
bool HandlesImbalancedData { get; set; } |
Whether designed for imbalanced data (Focal, Dice). |
bool HasStandardGradientSign { get; set; } |
Whether the gradient sign follows standard convention (positive when predicted > actual). |
bool IsNonNegative { get; set; } |
Whether the loss is always ≥ 0. |
bool IsRobustToOutliers { get; set; } |
Whether robust to outliers (Huber, MAE). |
bool IsSymmetric { get; set; } |
Whether L(x,y) == L(y,x). |
bool RequiresProbabilityInputs { get; set; } |
Whether inputs must be in [0,1]. |
bool SupportsClassWeights { get; set; } |
Whether per-class weights are supported. |
bool ZeroDerivativeForIdentical { get; set; } |
Whether dL/dp == 0 when predicted == actual. |
bool ZeroForIdentical { get; set; } |
Whether L(x,x) == 0. |