screamer.js
    Preparing search index...

    Function timeSplits

    • Train and test rows of time-ordered folds, with the training rows whose labels reach into the test block left out.

      Returns nSplits pairs [train, test] of row indices. The folds are those of scikit-learn's TimeSeriesSplit: the nSplits test blocks of testSize rows end at row n, and each fold trains on the rows before its test block, the most recent maxTrainSize of them when it is given. A training row t is left out when t + labelLength[t] reaches the first test row, because its label would use test data. A NaN or negative length raises, and so does a fold left with no training rows. Mirrors Python's screamer.time_splits.

      Parameters

      Returns [Int32Array<ArrayBufferLike>, Int32Array<ArrayBufferLike>][]