MATH303 project on reservoir computing for chaotic systems (currently focused on the Lorenz system).
lorenz.py: reproducible Lorenz + reservoir computing experiment pipelineeuler_method.py: simple Euler simulation for the Lorenz systemoutputs_final/: generated figures and metrics from the tuned run (created after runninglorenz.py)
- Deterministic runs with a fixed random seed
- Lorenz data generation via
scipy.integrate.solve_ivp - Reservoir computing training with ridge regression
- Validation-based hyperparameter search
- Test forecasting metrics (including valid prediction time)
- Lyapunov exponent estimation from the autonomous reservoir
- Saved plots and JSON metrics for report writing
Use a Python environment with:
numpyscipymatplotlib
You can install them with:
pip install -r requirements.txtExample tuned run:
MPLBACKEND=Agg MPLCONFIGDIR=.mplconfig python lorenz.py --trials 12 --forecast-steps 4000 --out-dir outputs_finalIf your default Python does not have scientific packages, use your Conda Python (example):
MPLBACKEND=Agg MPLCONFIGDIR=.mplconfig /Users/sandyuelin/miniconda3/bin/python lorenz.py --trials 12 --forecast-steps 4000 --out-dir outputs_finalThe script writes:
metrics.json: final experiment metrics and best hyperparameterstrial_records.json: validation scores from the hyperparameter searchtimeseries_test_forecast.pngphase_portrait_test.pngreturn_map_test.pnghyperparameter_search.png