Tutorial: Machine Learning for Environmental and Geosciences (MLEG)
This tutorial is split into two practical parts.
ML_intro provides an introduction to classical Machine Learning approaches with sklearn.
DL_tutorial introduces convolutional neural networks (CNNs) with keras and tensorflow.
Clone this repository to your local machine with:
git clone https://github.com/langnico/MLEG_tutorial.git
Download the required data for the "DL_tutorial" from this link:
Move the directories into the
DL_tutorial/ directory. The directory tree should look like this:
We are going to write and execute the code in a jupyter notebook. The DL_tutorial will use keras with a tensorflow backend.
Therefore, we need to install:
Further we will need the python packages/modules:
We propose to install python via anaconda.
Create a new environment:
conda create --name MLEGenv python=3.6
Activate the new environment
- Linux and macOS:
source activate MLEGenv
--> now your terminal prompt should start with (MLEGenv)
Install the following packages in your activated MLEGenv:
conda install jupyter conda install scikit-learn conda install pandas conda install matplotlib conda install keras
Install tensorflow following the: official installation instructions
Verify your installation
In the activated MLEGenv type
which jupyter. This should point to the python installation in your conda env e.g.
Open a terminal and go to the location of the file:
Then open the jupyter notebook with:
jupyter notebook installation_check.ipynb
NOTE: If this does not automatically open a browser showing the notebook, then open a browser (Firefox, Chrome) and type:
Then select the first cell containing the imports and click on the
> RunButton. If your installation was successful, the output should be like this:
Using TensorFlow backend. successfully imported keras version: 2.2.4
- Riccardo De Lutio
- Mikhail Usvyatsov
- Nico Lang