ncrf.RegressionData.timeslice¶
- RegressionData.timeslice(idx)¶
Return a new dataset restricted to a subset of this dataset’s samples.
- Parameters:
idx – Samples to retain, as integer indices or a boolean mask into this dataset’s
samples.
Notes
The slice’s arrays are the corresponding rows of this dataset’s arrays, rescaled to the slice’s own
norm_factor. Slicing them is much cheaper than rebuilding them from the NDVars, so this dataset’s arrays are built once and shared by all slices, such as cross-validation folds.