View source: R/ts-skedactiy-plot.R
ts_scedacity_scatter_plot | R Documentation |
This takes in a calibration tibble and will produce a scedacity plot.
ts_scedacity_scatter_plot(
.calibration_tbl,
.model_id = NULL,
.interactive = FALSE
)
.calibration_tbl |
A calibrated modeltime table. |
.model_id |
The id of a particular model from a calibration tibble. If
there are multiple models in the tibble and this remains NULL then the
plot will be returned using |
.interactive |
A boolean with a default value of FALSE. TRUE will produce
an interactive |
This takes in a calibration tibble and will create a scedacity plot. You can also
pass in a model_id
and a boolean for interactive
which will return a
plotly::ggplotly
interactive plot.
A Scedacity plot.
Steven P. Sanderson II, MPH
https://en.wikipedia.org/wiki/Homoscedasticity
Other Plot:
ts_brownian_motion_plot()
,
ts_event_analysis_plot()
,
ts_qq_plot()
Other Utility:
auto_stationarize()
,
calibrate_and_plot()
,
internal_ts_backward_event_tbl()
,
internal_ts_both_event_tbl()
,
internal_ts_forward_event_tbl()
,
model_extraction_helper()
,
ts_get_date_columns()
,
ts_info_tbl()
,
ts_is_date_class()
,
ts_lag_correlation()
,
ts_model_auto_tune()
,
ts_model_compare()
,
ts_model_rank_tbl()
,
ts_model_spec_tune_template()
,
ts_qq_plot()
,
ts_to_tbl()
,
util_difflog_ts()
,
util_doublediff_ts()
,
util_doubledifflog_ts()
,
util_log_ts()
,
util_singlediff_ts()
# NOT RUN
## Not run:
suppressPackageStartupMessages(library(dplyr))
suppressPackageStartupMessages(library(timetk))
suppressPackageStartupMessages(library(modeltime))
suppressPackageStartupMessages(library(rsample))
suppressPackageStartupMessages(library(workflows))
suppressPackageStartupMessages(library(parsnip))
suppressPackageStartupMessages(library(recipes))
data_tbl <- ts_to_tbl(AirPassengers) %>%
select(-index)
splits <- time_series_split(
data_tbl,
date_var = date_col,
assess = "12 months",
cumulative = TRUE
)
rec_obj <- recipe(value ~ ., training(splits))
model_spec_arima <- arima_reg() %>%
set_engine(engine = "auto_arima")
model_spec_mars <- mars(mode = "regression") %>%
set_engine("earth")
wflw_fit_arima <- workflow() %>%
add_recipe(rec_obj) %>%
add_model(model_spec_arima) %>%
fit(training(splits))
wflw_fit_mars <- workflow() %>%
add_recipe(rec_obj) %>%
add_model(model_spec_mars) %>%
fit(training(splits))
model_tbl <- modeltime_table(wflw_fit_arima, wflw_fit_mars)
calibration_tbl <- model_tbl %>%
modeltime_calibrate(new_data = testing(splits))
ts_scedacity_scatter_plot(calibration_tbl)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.