in src/smote_variants.py [0:0]
def __init__(self, proportion=1.0, topology="star", random_state=None):
"""
Constructor of the sampling object
Args:
proportion (float): proportion of the difference of n_maj and n_min
to sample e.g. 1.0 means that after sampling
the number of minority samples will be equal
to the number of majority samples
topoplogy (str): 'star'/'bus'/'mesh'
random_state (int/RandomState/None): initializer of random_state,
like in sklearn
"""
super().__init__()
self.check_greater_or_equal(proportion, "proportion", 0.0)
if topology.startswith("poly"):
self.check_greater_or_equal(int(topology.split("_")[-1]), "topology", 1)
else:
self.check_isin(topology, "topology", ["star", "bus", "mesh"])
self.proportion = proportion
self.topology = topology
self.set_random_state(random_state)