Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

summarize_accuracy_metrics

Summarize Accuracy Metrics


Description

This is an internal function used by modeltime_accuracy().

Usage

summarize_accuracy_metrics(data, truth, estimate, metric_set)

Arguments

data

A data.frame containing the truth and estimate columns.

truth

The column identifier for the true results (that is numeric).

estimate

The column identifier for the predicted results (that is also numeric).

metric_set

A yardstick::metric_set() that is used to summarize one or more forecast accuracy (regression) metrics.

Examples

library(tibble)
library(dplyr)

predictions_tbl <- tibble(
    group = c("model 1", "model 1", "model 1",
              "model 2", "model 2", "model 2"),
    truth = c(1, 2, 3,
              1, 2, 3),
    estimate = c(1.2, 2.0, 2.5,
                 0.9, 1.9, 3.3)
)

predictions_tbl %>%
    group_by(group) %>%
    summarize_accuracy_metrics(
        truth, estimate,
        metric_set = default_forecast_accuracy_metric_set()
    )

modeltime

The Tidymodels Extension for Time Series Modeling

v0.5.1
MIT + file LICENSE
Authors
Matt Dancho [aut, cre], Business Science [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.