museotoolbox.cross_validation.SpatialLeaveOneSubGroupOut.get_n_splits

SpatialLeaveOneSubGroupOut.get_n_splits(X=None, y=None, groups=None)

Returns the number of splitting iterations in the cross-validator.

Parameters
  • X (array-like, shape (n_samples, n_features), optional) – Training data, where n_samples is the number of samples and n_features is the number of features.

  • y (array-like, of length n_samples) – The target variable for supervised learning problems.

  • groups (array-like, with shape (n_samples,), optional) – Subgroup labels for the samples used while splitting the dataset into train/test set.

Returns

n_splits – The number of splits.

Return type

int