LazyMTS.Rd
See also https://techtonique.github.io/nnetsauce/
LazyMTS(
verbose = 0,
ignore_warnings = TRUE,
custom_metric = NULL,
predictions = FALSE,
random_state = 42L,
estimators = "all",
preprocess = FALSE,
show_progress = TRUE,
...
)
monitor progress (0
, default, is false and 1
is true)
print trace when model fitting failed
defining a custom metric (default is NULL
)
obtain predictions (default is FALSE
)
reproducibility seed
specify regressors to be adjusted (default is 'all')
preprocessing input covariates (default is FALSE FALSE
)
additional parameters to be passed to nnetsauce::CustomRegressor
a list that you can $fit
set.seed(123)
X <- matrix(rnorm(300), 100, 3)
(index_train <- base::sample.int(n = nrow(X),
size = floor(0.8*nrow(X)),
replace = FALSE))
#> [1] 60 62 80 9 11 43 30 61 74 55 93 34 57 38 84 63 46 78 70 18 2 72 75 21 88
#> [26] 71 79 59 37 91 6 40 82 28 32 49 35 67 47 20 1 5 96 99 90 98 48 51 10 53
#> [51] 65 7 87 44 36 23 89 24 4 29 45 58 33 3 54 94 76 83 66 8 26 56 14 25 13
#> [76] 50 31 92 22 16
X_train <- data.frame(X[index_train, ])
X_test <- data.frame(X[-index_train, ])
obj <- LazyMTS()
res <- obj$fit(X_train, X_test)
print(res[[1]])
#> [1] 0.9693231 0.9857480 0.9899658 0.9907240 0.9907240 0.9907240 0.9907240
#> [8] 0.9907240 0.9956436 0.9966559 1.0050021 1.0110766 1.0155043 1.0204875
#> [15] 1.0255662 1.0429340 1.0568736 1.0676467 1.2321289 1.2463809 1.3765455
#> [22] 1.4109004 1.4451682 1.6345720 1.7938410 2.0591218 2.0591218 2.0781683
#> [29] 2.0784001