I created a number of ML models in R and I aim at combining them to form an ensemble.

I learned about SuperLearner library which cross validates many models and returns the weight to each model in the ensemble.

However, the cross validation mechanism randomly samples observation out of the whole training set. This carries the issue that in a regression model if the y is not iid (typical in financial time series) then this sampling method introduces a bias.

Is there a way to set the cross-validation set equal to an x% of consecutive observations within the training set so that serial autocorrelation is taken into account?



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.