Calculate fraction of predictions within threshold of truth.
Usage
CalculateAccuracy(predictions, truth, threshold = 0.05)
Arguments
- predictions
Numeric vector or matrix of predictions.
- truth
Numeric vector or matrix of true values.
- threshold
Numeric. Threshold for accuracy calculation. Default is 0.05.
Value
Accuracy (fraction between 0 and 1).