Class Score
Contains scoring statistics for a given model.
Inheritance
Inherited Members
Namespace:numl.Supervised
Assembly:numl.dll
Syntax
public class Score
Constructors
View SourceScore()
Initializes a new Score object.
Declaration
public Score()
Properties
View SourceAccuracy
Gets or sets the total test accuracy as defined by the normalized distribution over true vs negative cases.
Declaration
public double Accuracy { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
AUC
Gets the Area Under the Curve value for the current fixed stationary point of the Precision / Recall curve.
Declaration
public double AUC { get; }
Property Value
Type | Description |
---|---|
System.Double |
CoefRMSE
Gets or sets the Coefficient of Variation of the RMSE.
Declaration
public double CoefRMSE { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
CrossEntropy
Gets or sets the cross entropy loss.
Declaration
public double CrossEntropy { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Examples
Gets or sets the total number of scored examples.
Declaration
public int Examples { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Fallout
Gets the Fallout value of the model.
A higher value indicates the model has decreased prediction accuracy, otherwise known as the False-Positive-Rate (FPR).
Declaration
public double Fallout { get; }
Property Value
Type | Description |
---|---|
System.Double |
FalseNegatives
Gets or sets the number of incorrectly scored negative examples.
Declaration
public int FalseNegatives { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
FalsePositives
Gets or sets the number of incorrectly scored positive examples.
Declaration
public int FalsePositives { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
FScore
Returns the F Score of the model.
The F Score determines the tradeoff between higher prediction confidence and reducing false negative predictions. (Higher is better).
Declaration
public double FScore { get; }
Property Value
Type | Description |
---|---|
System.Double |
MeanAbsError
Gets or sets the mean absolute error.
Declaration
public double MeanAbsError { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
MSE
Gets or sets the mean squared error of the predictions.
Declaration
public double MSE { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
NormRMSE
Gets or sets the normalised RMSE.
Declaration
public double NormRMSE { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Precision
Gets the Precision of the model.
A higher precision indicates the model has a higher positive prediction confidence. Also known as the Positive-Predictive-Value (PPV).
Declaration
public double Precision { get; }
Property Value
Type | Description |
---|---|
System.Double |
Recall
Gets the Recall of the model.
A higher recall indicates the model has scored better on reducing false negative predictions. Also known as the Sensitivity or True-Positive-Rate (TPR).
Declaration
public double Recall { get; }
Property Value
Type | Description |
---|---|
System.Double |
RMSE
Gets or sets the Root Mean Squared Error of the predictions.
Declaration
public double RMSE { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Specificity
Gets the Specificity of the model.
A higher value indicates the model has scored better at classifying negative examples, otherwise known as the True-Negative-Rate (TNR).
Declaration
public double Specificity { get; }
Property Value
Type | Description |
---|---|
System.Double |
SSE
Gets or sets the sum of squared errors of the predictions.
Declaration
public double SSE { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
TotalNegatives
Gets or sets the total number of negative examples.
Declaration
public int TotalNegatives { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
TotalPositives
Gets or sets the total number of positive examples.
Declaration
public int TotalPositives { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
TrueNegatives
Gets or sets the number of correctly scored negative examples.
Declaration
public int TrueNegatives { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
TruePositives
Gets or sets the number of correctly scored positive examples.
Declaration
public int TruePositives { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
View SourceCombineScores(Score[])
Combines and averages metrics across all the given scores.
Declaration
public static Score CombineScores(params Score[] scores)
Parameters
Type | Name | Description |
---|---|---|
Score[] | scores | Scores. |
Returns
Type | Description |
---|---|
Score |
ComputeCoefRMSE(Vector, Vector)
Computes the Coefficient of Variation of the Root Mean Squared Error for the given inputs.
Declaration
public static double ComputeCoefRMSE(Vector y1, Vector y2)
Parameters
Type | Name | Description |
---|---|---|
Vector | y1 | Predicted values. |
Vector | y2 | Actual values. |
Returns
Type | Description |
---|---|
System.Double | Double. |
ComputeCrossEntropy(Vector, Vector)
Computes the Cross Entropy Loss for the given inputs.
Declaration
public static double ComputeCrossEntropy(Vector y1, Vector y2)
Parameters
Type | Name | Description |
---|---|---|
Vector | y1 | Predicted values. |
Vector | y2 | Actual values. |
Returns
Type | Description |
---|---|
System.Double |
ComputeMeanError(Vector, Vector)
Computes the Mean Absolute Error for the given inputs.
Declaration
public static double ComputeMeanError(Vector y1, Vector y2)
Parameters
Type | Name | Description |
---|---|---|
Vector | y1 | Predicted values. |
Vector | y2 | Actual values. |
Returns
Type | Description |
---|---|
System.Double |
ComputeMSE(Vector, Vector)
Computes the Mean Squared Error of the given inputs.
Declaration
public static double ComputeMSE(Vector y1, Vector y2)
Parameters
Type | Name | Description |
---|---|---|
Vector | y1 | Predicted values. |
Vector | y2 | Actual values. |
Returns
Type | Description |
---|---|
System.Double | Double. |
ComputeNormRMSE(Vector, Vector)
Computes the Normalized Root Mean Squared Error for the given inputs.
Declaration
public static double ComputeNormRMSE(Vector y1, Vector y2)
Parameters
Type | Name | Description |
---|---|---|
Vector | y1 | Predicted values. |
Vector | y2 | Actual values. |
Returns
Type | Description |
---|---|
System.Double | Double. |
ComputeRMSE(Vector, Vector)
Computes the Root Mean Squared Error for the given inputs.
Declaration
public static double ComputeRMSE(Vector y1, Vector y2)
Parameters
Type | Name | Description |
---|---|---|
Vector | y1 | Predicted values. |
Vector | y2 | Actual values. |
Returns
Type | Description |
---|---|
System.Double | Double. |
ComputeSSE(Vector, Vector)
Computes the Mean Squared Error of the given inputs.
Declaration
public static double ComputeSSE(Vector y1, Vector y2)
Parameters
Type | Name | Description |
---|---|---|
Vector | y1 | Predicted values. |
Vector | y2 | Actual values. |
Returns
Type | Description |
---|---|
System.Double | Double. |
ScorePredictions(Vector, Vector, Double, Double)
Scores a set of predictions against the actual values.
Declaration
public static Score ScorePredictions(Vector predictions, Vector actual, double truthLabel = 1, double falseLabel = -1)
Parameters
Type | Name | Description |
---|---|---|
Vector | predictions | Predicted values. |
Vector | actual | Actual values. |
System.Double | truthLabel | (Optional) the truth label in the actual vector. |
System.Double | falseLabel | (Optional) the false label in the actual vector. |
Returns
Type | Description |
---|---|
Score |
ToString()
Returns a string representation of the current Score object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |