Skip to content

Commit

Permalink
update forecasting vignette: glmnet
Browse files Browse the repository at this point in the history
  • Loading branch information
mdancho84 committed Sep 18, 2023
1 parent c1cf1d1 commit b062fc8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Imports:
Suggests:
modeltime,
tidymodels,
glmnet,
workflows,
parsnip,
tune,
Expand Down
4 changes: 3 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# timetk 2.8.4

Update forecasting vignette: Use `glmnet` for time series forecasting.

CRAN Fixes:
- `tzdata` time zone fixes:
- GB -> Europe/London
- NZ -> Pacific/Auckland
- US/Eastern -> America/New_York
- US/Pacific -> America/Los_Angeles
- Add @aliases to timetk-package
- Add `@aliases` to timetk-package

# timetk 2.8.3

Expand Down
11 changes: 7 additions & 4 deletions vignettes/TK03_Forecasting_Using_Time_Series_Signature.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ library(dplyr)
library(timetk)
# Used to convert plots from interactive to static
interactive = TRUE
interactive = FALSE
```

# Data
Expand Down Expand Up @@ -139,11 +139,14 @@ juice(prep(recipe_spec_final))

## Model Specification

Next, let's create a model specification. We'll use a `lm`.
Next, let's create a model specification. We'll use a Elastic Net penalized regression via the `glmnet` package.

```{r}
model_spec_lm <- linear_reg(mode = "regression") %>%
set_engine("lm")
model_spec_lm <- linear_reg(
mode = "regression",
penalty = 0.1
) %>%
set_engine("glmnet")
```

## Workflow
Expand Down

0 comments on commit b062fc8

Please sign in to comment.