Skip to content

Commit

Permalink
chore: Refactor GradientDescent class docstring formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
icarosadero committed May 5, 2024
1 parent ad2109e commit c10ca7f
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions pyduino/optimization/gradient_descent.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,12 @@ def __init__(self, population_size: int, ranges: list[float], damping: float = 0
Where $\frac{\partial f}{\partial t}$ is assumed to be zero.
ranges list of pairs:
Maxima and minima that each parameter can cover.
Example: [(0, 10), (0, 10)] for two parameters ranging from 0 to 10.
population_size int:
Number of individuals in the population.
damping float:
Damping factor to avoid oscillations. Default is 0.01.
rng_seed int:
Seed for the random number generator. Default is 0.
Args:
ranges (list of pairs): Maxima and minima that each parameter can cover.
Example: [(0, 10), (0, 10)] for two parameters ranging from 0 to 10.
population_size (int): Number of individuals in the population.
damping (float, optional): Damping factor to avoid oscillations. Defaults to 0.01.
rng_seed (int, optional): Seed for the random number generator. Defaults to 0.
"""
self.population_size = population_size
self.ranges = np.array(ranges)
Expand Down

0 comments on commit c10ca7f

Please sign in to comment.