SplittersUnion¶
-
class
mastml.legos.data_splitters.
SplittersUnion
(splitters)[source]¶ Bases:
sklearn.base.BaseEstimator
,sklearn.base.TransformerMixin
Class to take the union of two separate splitting routines, so that many splitting routines can be performed at once
- Args:
- splitters: (list), a list of scikit-learn splitter objects
- Methods:
get_n_splits: method to calculate the number of splits to perform across all splitters
- Args:
- X: (numpy array), array of X features y: (numpy array), array of y data groups: (numpy array), array of group labels
- Returns:
- (int), number of total splits to be conducted
split: method to perform split into train indices and test indices
- Args:
- X: (numpy array), array of X features y: (numpy array), array of y data groups: (numpy array), array of group labels
- Returns:
- (numpy array), array of train and test indices
Methods Summary
get_n_splits
(X, y[, groups])split
(X, y[, groups])Methods Documentation