in src/oversamplers.py [0:0]
def _imblearn_sampling_strategy(y: np.ndarray, ratio: float):
# Calcualte sampling strategy. 0 Must be the majority label and 1 must be the minority label.
count0 = np.sum(y == 0)
sampling_strategy = {0: count0, 1: int(np.round(count0 * ratio / (1 - ratio)))}
if sampling_strategy[1] < np.sum(y == 1):
return None
return sampling_strategy