evalml.preprocessing.BalancedClassificationDataTVSplit.__init__

BalancedClassificationDataTVSplit.__init__(sampling_ratio=0.25, min_samples=100, min_percentage=0.1, test_size=0.25, shuffle=True, random_seed=0)[source]

Create Balanced Classification Data TV splitter

Parameters
  • sampling_ratio (float) – The smallest minority:majority ratio that is accepted as ‘balanced’. For instance, a 1:4 ratio would be represented as 0.25, while a 1:1 ratio is 1.0. Must be between 0 and 1, inclusive. Defaults to 0.25.

  • min_samples (int) – The minimum number of samples that we must have for any class, pre or post sampling. If a class must be downsampled, it will not be downsampled past this value. To determine severe imbalance, the minority class must occur less often than this and must have a class ratio below min_percentage. Must be greater than 0. Defaults to 100.

  • min_percentage (float) – The minimum percentage of the minimum class to total dataset that we tolerate, as long as it is above min_samples. If min_percentage and min_samples are not met, treat this as severely imbalanced, and we will not resample the data. Must be between 0 and 0.5, inclusive. Defaults to 0.1.

  • test_size (float) – The size of the test split. Defaults to 0.25.

  • shuffle (bool) – Whether or not to shuffle the data before splitting. Defaults to True.

  • random_seed (int) – The seed to use for random sampling. Defaults to 0.