Skip to content

Commit

Permalink
Merge branch 'master' of github.com:fotobiolab-unb/pyduino-parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
icarosadero committed Jun 16, 2024
2 parents a66712f + c10ca7f commit 35713bf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 179 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ jobs:
python-version: '3.12'

# ADJUST THIS: install all dependencies (including pdoc)
- run: pip install pdoc3
- run: pip install pdoc==14.4.0
- run: pip install -r requirements.txt
- run: sudo chmod 777 /var/log
# ADJUST THIS: build your documentation into docs/.
# We use a custom build script for pdoc itself, ideally you just run `pdoc -o docs/ ...` here.
- run: pdoc -o docs/ pyduino
- run: pdoc -d google --math --search -o docs pyduino/*

- uses: actions/upload-pages-artifact@v3
with:
Expand All @@ -47,5 +47,6 @@ jobs:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
166 changes: 0 additions & 166 deletions pyduino/dashboard.py

This file was deleted.

17 changes: 7 additions & 10 deletions pyduino/optimization/gradient_descent.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,19 @@

class GradientDescent(Optimizer):
def __init__(self, population_size: int, ranges: list[float], damping: float = 0.01, rng_seed: int = 0):
"""
r"""
This gradient descent algorithm assumes that the optimization function 'f' is to be minimized, differentiable, and time independent.
$$\frac{\mathrm{d} f}{\mathrm{d} t} = \frac{\partial f}{\partial \vec{x}}\frac{\mathrm{d} \vec{x}}{\mathrm{d} t}$$
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 35713bf

Please sign in to comment.