| performance | R Documentation |
Function to calculate the performance metrics between lists of original and interpolated series.
See additional documentation provided in this package ("~/metric_definitions.pdf/") for a full descriptions of the the performance criteria.
Resulting object is of class 'pf'.
performance(OriginalData, IntData, GappyData, custom = NULL)
OriginalData |
|
IntData |
|
GappyData |
|
custom |
|
The following is a description of the list of base performance metrics included in the returned object:
| ID | Criterion | Optimal |
| ...... | ........... | ......... |
| 1 | pearson_r | max |
| 2 | r_squared | max |
| 3 | AD | min |
| 4 | MBE | min |
| 5 | ME | min |
| 6 | MAE | min |
| 7 | MRE | min |
| 8 | MARE | min |
| 9 | MAPE | min |
| 10 | SSE | min |
| 11 | MSE | min |
| 12 | RMS | min |
| 13 | NMSE | min |
| 14 | RE | max |
| 15 | RMSE | min |
| 16 | NRMSD | min |
| 17 | RMSS | min |
| 18 | MdAPE | min |
Users can define and pass-in their own custom performance metric functions, but must adhere to the following rules:
Inputs are limited to *ONLY* x (lowercase; the original time series) and X (uppercase; the interpolated time series)
Output must be a single numeric value
# User-defined functions to calculate a custom performance metric (see Details for rules)
my_metric1 <- function(x,X){
# Sum of original + interpolated values
val <- x + X
return(val) # return value must be a single numeric element
}
my_metric2 <- function(x,X){
# Sum of index positions of interpolated values
val <- sum(which(x != X))
return(val) # return value must be a single numeric element
}
# Implementing in eval_performance()
performance(OriginalData = OriginalData, IntData = IntData, GappyData = GappyData, custom = c("my_metric1", "my_metric2"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.