Thursday workshop at the Institute of Computing for Climate Science Summer School 2022.
- Slides: training_ml_models.pdf
- Notebook: training_ml_models.ipynb
- Script: training_ml_models.py
git clone https://github.com/handley-lab/2022-cambridge-iccs.git
cd 2022-cambridge-iccs
You will need to install
- notebook
- matplotlib
- scikit-learn
- tensorflow
- torch
in that order -- you can leave the tensorflow/pytorch installation in the background until exercises 2 and 3 if downloads are slow.
All are pip-installable, which you should do either:
- via pip
- via conda
- via your system installation (
apt-get
,yum
,pacman
, etc) (none of these packages are controversial),
The way I do it when not using my arch system packages is with virtual environments:
python -m venv my_venv
source my_venv/bin/activate
pip install notebook matplotlib scikit-learn tensorflow torch
python -m ipykernel install --user --name=my_venv
The final line tells the jupyter notebook where to look for the virtual environment.
Start the jupyter notebook
jupyter-notebook training_ml_models.ipynb
and select the virtual environment we've just installed
- How do I convert between notebooks and python scripts? py2nb
- Why would I want to do that? vimteractive