Skip to content

Commit

Permalink
Update NNETAR docs
Browse files Browse the repository at this point in the history
Resolves #405
  • Loading branch information
mitchelloharawild committed Nov 27, 2023
1 parent d51dc52 commit b336612
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# fable (development version)

## Improvements

* Documentation improvements.

# fable 0.3.3

Small patch to resolve CRAN check issues.
Expand Down
6 changes: 5 additions & 1 deletion R/nnetar.R
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,16 @@ NNETAR <- function(formula, n_nodes = NULL, n_networks = 20, scale_inputs = TRUE

#' @inherit forecast.ETS
#'
#' @param simulate If `TRUE`, forecast distributions are produced by sampling from a normal distribution. Without simulation, forecast uncertainty cannot be estimated for this model and instead a degenerate distribution with the forecast mean will be produced.
#' @param bootstrap If `TRUE`, forecast distributions are produced by sampling from the model's training residuals.
#' @param times The number of sample paths to use in producing the forecast distribution. Setting `simulate = FALSE` or `times = 0` will produce degenerate forecast distributions of the forecast mean.
#'
#' @examples
#' as_tsibble(airmiles) %>%
#' model(nn = NNETAR(box_cox(value, 0.15))) %>%
#' forecast(times = 10)
#' @export
forecast.NNETAR <- function(object, new_data, specials = NULL, simulate = TRUE, bootstrap = FALSE, times = 1000, ...) {
forecast.NNETAR <- function(object, new_data, specials = NULL, simulate = TRUE, bootstrap = FALSE, times = 5000, ...) {
require_package("nnet")

# Prepare xreg
Expand Down
8 changes: 4 additions & 4 deletions man/forecast.NNETAR.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b336612

Please sign in to comment.