Skip to content

Commit

Permalink
fix bug in subsampling of ensembles
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas Clark committed Dec 10, 2024
1 parent 415b79c commit b7a3984
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/ensemble.R
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ ensemble.mvgam_forecast <- function(object, ..., ndraws = 5000){
if(NROW(x) < nsamps){
sampinds <- sample(1:NROW(x), nsamps, replace = TRUE)
} else {
sampinds <- 1:nsamps
sampinds <- sample(1:NROW(x), nsamps, replace = FALSE)
}

x[sampinds, ]
Expand Down

0 comments on commit b7a3984

Please sign in to comment.