def eta(self, eta): if not (isinstance(eta, float) or isinstance(eta, int)): raise e.TypeError('`eta` should be a float or integer') if eta < 0: raise e.ValueError('`eta` should be >= 0') self._eta = eta
def a(self, a): if not isinstance(a, (float, int)): raise e.TypeError('`a` should be a float or integer') if a < 0: raise e.ValueError('`a` should be >= 0') self._a = a
def prunning_ratio(self, prunning_ratio): if not isinstance(prunning_ratio, (float, int)): raise e.TypeError('`prunning_ratio` should be a float or integer') if prunning_ratio < 0 or prunning_ratio > 1: raise e.ValueError('`prunning_ratio` should be between 0 and 1') self._prunning_ratio = prunning_ratio
def positive_field(self, positive_field): if not isinstance(positive_field, (float, int)): raise e.TypeError('`positive_field` should be a float or integer') if positive_field < 0 or positive_field > 1: raise e.ValueError('`positive_field` should be between 0 and 1') self._positive_field = positive_field
def n_trials(self, n_trials): if not isinstance(n_trials, int): raise e.TypeError('`n_trials` should be an integer') if n_trials <= 0: raise e.ValueError('`n_trials` should be > 0') self._n_trials = n_trials
def l(self, l): if not isinstance(l, (float, int)): raise e.TypeError('`l` should be a float or integer') if l < 0: raise e.ValueError('`l` should be >= 0') self._l = l
def c_max(self, c_max): if not isinstance(c_max, (float, int)): raise e.TypeError('`c_max` should be a float or integer') if c_max < self.c_min: raise e.ValueError('`c_max` should be >= `c_min`') self._c_max = c_max
def bw_min(self, bw_min): if not isinstance(bw_min, (float, int)): raise e.TypeError('`bw_min` should be a float or integer') if bw_min < 0: raise e.ValueError('`bw_min` should be >= 0') self._bw_min = bw_min
def PAR(self, PAR): if not isinstance(PAR, (float, int)): raise e.TypeError('`PAR` should be a float or integer') if PAR < 0 or PAR > 1: raise e.ValueError('`PAR` should be between 0 and 1') self._PAR = PAR
def LP(self, LP): if not isinstance(LP, int): raise e.TypeError('`LP` should be a integer') if LP <= 0: raise e.ValueError('`LP` should be > 0') self._LP = LP
def HMCR(self, HMCR): if not isinstance(HMCR, (float, int)): raise e.TypeError('`HMCR` should be a float or integer') if HMCR < 0 or HMCR > 1: raise e.ValueError('`HMCR` should be between 0 and 1') self._HMCR = HMCR
def PAR_min(self, PAR_min): if not isinstance(PAR_min, (float, int)): raise e.TypeError('`PAR_min` should be a float or integer') if PAR_min < 0 or PAR_min > 1: raise e.ValueError('`PAR_min` should be between 0 and 1') self._PAR_min = PAR_min
def bw(self, bw): if not isinstance(bw, (float, int)): raise e.TypeError('`bw` should be a float or integer') if bw < 0: raise e.ValueError('`bw` should be >= 0') self._bw = bw
def p(self, p): if not (isinstance(p, float) or isinstance(p, int)): raise e.TypeError('`p` should be a float or integer') if p < 0 or p > 1: raise e.ValueError('`p` should be between 0 and 1') self._p = p
def beta(self, beta): if not isinstance(beta, (float, int)): raise e.TypeError('`beta` should be a float or integer') if beta < 0: raise e.ValueError('`beta` should be >= 0') self._beta = beta
def pm(self, pm): if not isinstance(pm, (float, int)): raise e.TypeError('`pm` should be a float or integer') if pm < 0 or pm > 1: raise e.ValueError('`pm` should be between 0 and 1') self._pm = pm
def f(self, f): if not isinstance(f, (float, int)): raise e.TypeError('`f` should be a float or integer') if f < 0: raise e.ValueError('`f` should be >= 0') self._f = f
def min_depth(self, min_depth): if not isinstance(min_depth, int): raise e.TypeError('`min_depth` should be an integer') if min_depth <= 0: raise e.ValueError('`min_depth` should be > 0') self._min_depth = min_depth
def c_min(self, c_min): if not isinstance(c_min, (float, int)): raise e.TypeError('`c_min` should be a float or integer') if c_min < 0: raise e.ValueError('`c_min` should be >= 0') self._c_min = c_min
def max_depth(self, max_depth): if not isinstance(max_depth, int): raise e.TypeError('`max_depth` should be an integer') if max_depth < self.min_depth: raise e.ValueError('`max_depth` should be >= `min_depth`') self._max_depth = max_depth
def r_ratio(self, r_ratio): if not isinstance(r_ratio, (float, int)): raise e.TypeError('`r_ratio` should be a float or integer') if r_ratio < 0 or r_ratio > 1: raise e.ValueError('`r_ratio` should be between 0 and 1') self._r_ratio = r_ratio
def k_max(self, k_max): if not isinstance(k_max, int): raise e.TypeError('`k_max` should be an integer') if k_max <= 0: raise e.ValueError('`k_max` should be > 0') self._k_max = k_max
def n_p(self, n_p): if not isinstance(n_p, int): raise e.TypeError('`n_p` should be an integer') if n_p <= 0: raise e.ValueError('`n_p` should be > 0') self._n_p = n_p
def h_max(self, h_max): if not isinstance(h_max, int): raise e.TypeError('`h_max` should be an integer') if h_max <= 0: raise e.ValueError('`h_max` should be > 0') self._h_max = h_max
def r_min(self, r_min): if not isinstance(r_min, (float, int)): raise e.TypeError('`r_min` should be a float or integer') if r_min < 0: raise e.ValueError('`r_min` should be >= 0') self._r_min = r_min
def b(self, b): if not isinstance(b, (float, int)): raise e.TypeError('`b` should be a float or integer') if b < 0: raise e.ValueError('`b` should be >= 0') self._b = b
def p_crossover(self, p_crossover): if not isinstance(p_crossover, (float, int)): raise e.TypeError('`p_crossover` should be a float or integer') if p_crossover < 0 or p_crossover > 1: raise e.ValueError('`p_crossover` should be between 0 and 1') self._p_crossover = p_crossover
def gamma(self, gamma): if not isinstance(gamma, (float, int)): raise e.TypeError('`gamma` should be a float or integer') if gamma < 0: raise e.ValueError('`gamma` should be >= 0') self._gamma = gamma
def p_reproduction(self, p_reproduction): if not isinstance(p_reproduction, (float, int)): raise e.TypeError('`p_reproduction` should be a float or integer') if p_reproduction < 0 or p_reproduction > 1: raise e.ValueError('`p_reproduction` should be between 0 and 1') self._p_reproduction = p_reproduction
def clip_ratio(self, clip_ratio): if not isinstance(clip_ratio, (float, int)): raise e.TypeError('`clip_ratio` should be a float or integer') if clip_ratio < 0 or clip_ratio > 1: raise e.ValueError('`clip_ratio` should be between 0 and 1') self._clip_ratio = clip_ratio