A wrapper around any learner that reweights observations. This reweighted is intended for time series, and ultimately assigns weights to losses. This learner is particularly useful as a metalearner wrapper. It can be used to create a time-adaptive ensemble, where a super learner is created in a manner that places more weight (with max weight of 1) on recent losses, and less weight is placed on losses further in the past.
R6Class
object.
Learner object with methods for training and prediction. See
Lrnr_base
for documentation on learners.
learner
The learner to wrap
folds=NULL
An origami
folds object. If NULL
,
folds from the task are used
full_fit=FALSE
If TRUE
, also fit the underlying
learner on the full data. This can then be accessed with
predict_fold(task, fold_number="full")
window
Observations corresponding to times outside of the
window are assigned weight of 0, and obervations corresponding to times
within the window are assigned weight of 1. The window is defined with
respect to the difference from the maximum time, where all times are
obtained from the task node for time. For example, if the maximum time is
100 and the window is 10, then obervations corresponding to times 90-100
are assigned weight 1 and obervations for times 1-89 are assigned weight 0.
If rate
is provided with window
, then times within the
window are assigned according to the rate
argument (and potentially
delay_decay
), and the times outside of the window are still
assigned weight of 0.
rate
A rate of decay to apply to the losses, where the decay function is (1-rate)^lag and the lag is the difference from all times to the maximum time.
delay_decay
The amount of time to delay decaying weights,
for optional use with rate
argument. The delay decay is subtracted
from the lags, such that lags less than the delay decay have lag of 0 and
thus weight of 1. For example, a delay decay of 10 assigns weight 1 to
observations that are no more than 10 time points away from the maximum
time; and for observations that are more than 10 time points away from the
maximum time, the weight is assigned according to the decay function.
In this example, observations corresponding to 11 time points away from the
maximum time would be assigned lag=1, 11-10, when setting the weights
with respect to (1-rate)^lag.
...
Not currently used.
Other Learners:
Custom_chain
,
Lrnr_HarmonicReg
,
Lrnr_arima
,
Lrnr_bartMachine
,
Lrnr_base
,
Lrnr_bayesglm
,
Lrnr_bilstm
,
Lrnr_caret
,
Lrnr_cv_selector
,
Lrnr_cv
,
Lrnr_dbarts
,
Lrnr_define_interactions
,
Lrnr_density_discretize
,
Lrnr_density_hse
,
Lrnr_density_semiparametric
,
Lrnr_earth
,
Lrnr_expSmooth
,
Lrnr_gam
,
Lrnr_ga
,
Lrnr_gbm
,
Lrnr_glm_fast
,
Lrnr_glm_semiparametric
,
Lrnr_glmnet
,
Lrnr_glmtree
,
Lrnr_glm
,
Lrnr_grfcate
,
Lrnr_grf
,
Lrnr_gru_keras
,
Lrnr_gts
,
Lrnr_h2o_grid
,
Lrnr_hal9001
,
Lrnr_haldensify
,
Lrnr_hts
,
Lrnr_independent_binomial
,
Lrnr_lightgbm
,
Lrnr_lstm_keras
,
Lrnr_mean
,
Lrnr_multiple_ts
,
Lrnr_multivariate
,
Lrnr_nnet
,
Lrnr_nnls
,
Lrnr_optim
,
Lrnr_pca
,
Lrnr_pkg_SuperLearner
,
Lrnr_polspline
,
Lrnr_pooled_hazards
,
Lrnr_randomForest
,
Lrnr_ranger
,
Lrnr_revere_task
,
Lrnr_rpart
,
Lrnr_rugarch
,
Lrnr_screener_augment
,
Lrnr_screener_coefs
,
Lrnr_screener_correlation
,
Lrnr_screener_importance
,
Lrnr_sl
,
Lrnr_solnp_density
,
Lrnr_solnp
,
Lrnr_stratified
,
Lrnr_subset_covariates
,
Lrnr_svm
,
Lrnr_tsDyn
,
Lrnr_xgboost
,
Pipeline
,
Stack
,
define_h2o_X()
,
undocumented_learner