Nothing
## ----setup, include = FALSE---------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
## ----sqrt---------------------------------------------------------------------
library(fable)
library(tsibble)
library(dplyr)
tourism %>%
filter(Region == "Melbourne") %>%
model(ETS(sqrt(Trips)))
## ----combine------------------------------------------------------------------
library(tsibble)
tourism %>%
filter(Region == "Melbourne") %>%
model(ETS(log(Trips + 1)))
## ----scaled-logit-------------------------------------------------------------
scaled_logit <- function(x, lower=0, upper=1){
log((x-lower)/(upper-x))
}
inv_scaled_logit <- function(x, lower=0, upper=1){
(upper-lower)*exp(x)/(1+exp(x)) + lower
}
my_scaled_logit <- new_transformation(scaled_logit, inv_scaled_logit)
## ----custom-transformation----------------------------------------------------
cbind(mdeaths, fdeaths) %>%
as_tsibble(pivot_longer = FALSE) %>%
model(ETS(my_scaled_logit(mdeaths, 750, 3000) ~
error("A") + trend("N") + season("A"))) %>%
report()
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.