1.7 KiB
W3D03 Piscine AI - Data Science
Keras 2
The goal of this day is to learn to use Keras to build Neural Networks and train them on small data sets. This helps to understand the specifics of networks for classification and regression.
Note:
The audit will provide the code and output because it is not straightforward to reproduce results using Keras. There are many source of randomness. Even if all the seeds are fixed to a constant they may be other source of randomness. https://machinelearningmastery.com/reproducible-results-neural-networks-keras/
Exercises of the day
- Exercise 0 Environment and libraries
- Exercise 1 Regression - Optimize
- Exercise 2 Regression example
- Exercise 3 Multi classification - Softmax
- Exercise 4 Multi classification - Optimize
- Exercise 5 Multi classification example
Virtual Environment
- Python 3.x
- NumPy
- Pandas
- Jupyter or JupyterLab
- Keras
Version of Keras I used to do the exercises: 2.4.3. I suggest to use the most recent one.
Ressources
Exercise 0 Environment and libraries
The goal of this exercise is to set up the Python work environment with the required libraries.
Note: For each quest, your first exercice will be to set up the virtual environment with the required libraries.
I recommend to use:
- the last stable versions of Python.
- the virtual environment you're the most confortable with.
virtualenv
andconda
are the most used in Data Science. - one of the most recents versions of the libraries required
- Create a virtual environment named with a version of Python >=
3.8
, with the following libraries:pandas
,numpy
,jupyter
andkeras
.