Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"""Calculate learning rate alpha with 0 <= alpha <= 1.
Parameters
----------
curr_it : int
Current iteration count
mode : str, optional
Mode of the learning rate (min, exp, expsquare)
Returns
-------
float
Learning rate
"""
return decreasing_rate(
self.learning_rate_start, self.learning_rate_end,
self.max_iterations_, curr_it, mode)
"""Calculate neighborhood function (= radius).
Parameters
----------
curr_it : int
Current number of iterations
mode : str
Mode of the decreasing rate
Returns
-------
float
Neighborhood function (= radius)
"""
return decreasing_rate(
self.radius_max_, self.radius_min_, self.max_iterations_,
curr_it, mode)