# NOT RUN {
library(tibble)
library(dplyr)
library(timetk)
set.seed(1)
data <- tibble(
time = tk_make_timeseries("2020", by = "sec", length_out = 10),
y = 1:10 + rnorm(10),
y_hat = 1:10 + rnorm(10)
)
# Default Metric Specification
default_forecast_accuracy_metric_set()
# Create a metric summarizer function from the metric set
calc_default_metrics <- default_forecast_accuracy_metric_set()
# Apply the metric summarizer to new data
calc_default_metrics(data, y, y_hat)
# }
Run the code above in your browser using DataLab