https://github.com/lightonai/double-descent-curve
Double Descent Curve with Optical Random Features
https://github.com/lightonai/double-descent-curve
machine-learning optical-network photonic-computing random-features ridge-regression
Last synced: 10 months ago
JSON representation
Double Descent Curve with Optical Random Features
- Host: GitHub
- URL: https://github.com/lightonai/double-descent-curve
- Owner: lightonai
- Created: 2020-01-13T12:51:58.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-06-22T00:08:15.000Z (almost 4 years ago)
- Last Synced: 2023-03-04T05:22:23.492Z (over 3 years ago)
- Topics: machine-learning, optical-network, photonic-computing, random-features, ridge-regression
- Language: Jupyter Notebook
- Homepage: https://medium.com/@LightOnIO/beyond-overfitting-and-beyond-silicon-the-double-descent-curve-18b6d9810e1b
- Size: 146 KB
- Stars: 23
- Watchers: 6
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Double Descent Curve
This is the code to reproduce Figure 5 and 6 of ["The double descent risk curve"](https://medium.com/@LightOnIO/beyond-overfitting-and-beyond-silicon-the-double-descent-curve-18b6d9810e1b) blog post on Medium.
This script recovers the double descent curve using random projections plus the `RidgeClassifier` from `scikit-learn`.
It is possible to choose between a synthetic optical processing unit (OPU) and the real OPU.
To request access to our cloud and try our optics-based hardware, contact us: https://www.lighton.ai/contact-us/
## Access to Optical Processing Units
To request access to LightOn Cloud and try our photonic co-processor, please visit: https://cloud.lighton.ai/
For researchers, we also have a LightOn Cloud for Research program, please visit https://cloud.lighton.ai/lighton-research/ for more information.
## Run the experiments
```
python ddc_ridgeclassifier.py # to use synthetic opu on mnist
python ddc_ridgeclassifier.py -dataset 'cifar10' # to use synthetic opu on cifar10
python ddc_ridgeclassifier.py -is_real_opu True # to use opu on mnist with threshold encoder
python ddc_ridgeclassifier.py -is_real_opu True -encoding_method 'autoencoder' # to use opu on mnist with autoencoder
python ddc_ridgeclassifier.py -is_real_opu True -dataset 'cifar10' # to use opu on cifar10 with threshold encoder
python ddc_ridgeclassifier.py -is_real_opu True -encoding_method 'autoencoder' -dataset 'cifaro10'# to use opu on cifar10 with autoencoder
```
Running `ddc_ridgeclassifier.py` outputs a `.pkl` file. To plot the results using this file look at the `plot.ipynb` example.