https://github.com/mborne/numpy-experiments
[DEV] Some basic examples written to get started with numpy and pytorch
https://github.com/mborne/numpy-experiments
autograd basics get-started least-squares numpy torch
Last synced: about 1 month ago
JSON representation
[DEV] Some basic examples written to get started with numpy and pytorch
- Host: GitHub
- URL: https://github.com/mborne/numpy-experiments
- Owner: mborne
- License: mit
- Created: 2020-11-25T07:46:54.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-06-02T22:22:46.000Z (about 1 year ago)
- Last Synced: 2025-06-03T12:21:02.913Z (about 1 year ago)
- Topics: autograd, basics, get-started, least-squares, numpy, torch
- Language: Jupyter Notebook
- Homepage:
- Size: 1.19 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# numpy-experiments
Some basic examples to test [numpy](https://docs.scipy.org/doc/numpy/user/quickstart.html), [matplotlib](https://matplotlib.org/index.html) and [pytorch](https://pytorch.org/).
## Examples
* [01-noisy-line](01-noisy-line.ipynb) : Estimate line parameters using [numpy.linalg.lstsq](https://numpy.org/doc/2.1/reference/generated/numpy.linalg.lstsq.html) (classical approach using linear algebra)
* [02-noisy-circle](02-noisy-circle.ipynb) : Estimate circle parameters using [numpy.linalg.lstsq](https://numpy.org/doc/2.1/reference/generated/numpy.linalg.lstsq.html) (same as 01-noisy-line except that linearization is required for non linear equations)
* [03-noisy-circle-gradient](03-noisy-circle-gradient.ipynb) : Estimate circle parameters using **gradient descent** with **symbolic differentiation** (before testing autograd from pytorch).
* [04-noisy-circle-autograd](04-noisy-circle-autograd.ipynb) : Estimate circle parameters using **gradient descent** with **autograd** from pytorch.
## Usage
With [uv](https://github.com/astral-sh/uv#readme) :
```bash
# download dependencies
uv sync
# start jupyter notebook (should open browser)
uv run --with jupyter jupyter lab
```
## License
[MIT](LICENSE)