-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
1,483 additions
and
317 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
221 changes: 0 additions & 221 deletions
221
tests/testthat/dashboard.nixtla.io/api/timegpt_multi_series-f5d236-POST.json
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
title: "Cross Validation" | ||
output: rmarkdown::html_vignette | ||
vignette: > | ||
%\VignetteIndexEntry{cross-validation} | ||
%\VignetteEngine{knitr::rmarkdown} | ||
%\VignetteEncoding{UTF-8} | ||
--- | ||
```{r setup, include=FALSE} | ||
library(httptest2) | ||
start_vignette("mocks") | ||
knitr::opts_chunk$set( | ||
collapse = TRUE, | ||
comment = "#>", | ||
fig.width = 12, | ||
fig.height = 6 | ||
) | ||
``` | ||
|
||
```{r} | ||
library(nixtlar) | ||
``` | ||
|
||
## 1. Load data | ||
|
||
```{r} | ||
df <- read.csv('https://raw.githubusercontent.com/Nixtla/transfer-learning-time-series/main/datasets/electricity-short.csv') | ||
head(df) | ||
``` | ||
|
||
## 2. Use cross validation with TimeGPT | ||
|
||
```{r} | ||
timegpt_cv_df <- timegpt_cross_validation(df, h = 8, id_col = "unique_id", n_windows = 5, step_size = 2) | ||
head(timegpt_cv_df) | ||
``` | ||
|
||
## 3. Plot TimeGPT forecasts | ||
|
||
```{r} | ||
timegpt_plot(df, timegpt_cv_df, h=8, max_insample_length = 200) | ||
``` | ||
|
||
|
||
```{r, include=FALSE} | ||
end_vignette() | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,6 @@ | |
"message": "success", | ||
"details": "request successful", | ||
"code": "B10", | ||
"requestID": "282UU84QRT", | ||
"requestID": "9CVV6A8CAL", | ||
"support": "If you have questions or need support, please email [email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -216,6 +216,6 @@ | |
"message": "success", | ||
"details": "request successful", | ||
"code": "B10", | ||
"requestID": "7Y8R9P4A6E", | ||
"requestID": "RCHQ6HA5GD", | ||
"support": "If you have questions or need support, please email [email protected]" | ||
} |
Oops, something went wrong.