Some simple machine learning examples using Keras and the MNIST database along with examples from solar and space physics.
See relevant slides from Space Physics 1 course at KTH slides
.
For the Python scripts you need to install anaconda with tensorflow
and some other libraries. To do so, install Anaconda
and run Anaconda Prompt Terminal. Alternatively one can use the miniconda version
.
From there create an environment and update the packages via the following code:
conda create -n ML_tensor python=3.9
conda activate ML_tensor
pip install tensorflow
conda install spyder numpy matplotlib seaborn scikit-learn pandas jupyterlab
pip install keras-tuner --upgrade
conda install -c conda-forge xgboost
conda install -c conda-forge shap
Then you can open Spyder IDE with the interpreter being the virtual environment "ML_tensor". Alternatively, you can start a Jupyter notebook session and read the notebooks of this repository.
You may also run the notebooks from the cloud through Binder. Keep in mind this might be a bit slow.