From c6d0fabd6d8990239dc6263fda1684e693469b0e Mon Sep 17 00:00:00 2001 From: miguel Date: Tue, 5 Dec 2023 17:22:51 +0000 Subject: [PATCH] docs(ai): typos and add link --- subjects/ai/keras-2/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/subjects/ai/keras-2/README.md b/subjects/ai/keras-2/README.md index f53ec80f7..777cf1bc1 100644 --- a/subjects/ai/keras-2/README.md +++ b/subjects/ai/keras-2/README.md @@ -40,13 +40,13 @@ I suggest to use the most recent one. 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. +**Note:** For each quest, your first exercise 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` and `conda` are the most used in Data Science. -- one of the most recents versions of the libraries required +- the virtual environment you're the most comfortable with. `virtualenv` and `conda` are the most used in Data Science. +- one of the most recent versions of the libraries required 1. Create a virtual environment named with a version of Python >= `3.8`, with the following libraries: `pandas`, `numpy`, `jupyter` and `keras`. @@ -91,7 +91,7 @@ https://keras.io/api/metrics/regression_metrics/ # Exercise 2: Regression example The goal of this exercise is to learn to train a neural network to perform a regression on a data set. -The data set is Auto MPG Dataset and the go is to build a model to predict the fuel efficiency of late-1970s and early 1980s automobiles. To do this, provide the model with a description of many automobiles from that time period. This description includes attributes like: cylinders, displacement, horsepower, and weight. +The data set is [Auto MPG Dataset](auto-mpg.csv) and the go is to build a model to predict the fuel efficiency of late-1970s and early 1980s automobiles. To do this, provide the model with a description of many automobiles from that time period. This description includes attributes like: cylinders, displacement, horsepower, and weight. https://www.tensorflow.org/tutorials/keras/regression @@ -102,7 +102,7 @@ https://www.tensorflow.org/tutorials/keras/regression - Scale the data using Standard Scaler 2. Train a neural network on the train set and predict on the test set. The neural network should have 2 hidden layers and the loss should be **mean_squared_error**. The expected **mean absolute error** on the test set is maximum 10. - _Hint_: inscrease the number of epochs + _Hint_: increase the number of epochs **Warning**: Do no forget to evaluate the neural network on the **SCALED** test set. --- @@ -128,7 +128,7 @@ Let us assume we want to classify images and we know they contain either apples, # Exercise 4: Multi classification - Optimize -The goal of this exercise is to learn to optimize a multi-classification neural network. As learnt previously, the loss function used in binary classification is the log loss - also called in Keras `binary_crossentropy`. This function is defined for binary classification and can be extended to multi-classfication. In Keras, the extended loss that supports multi-classification is `binary_crossentropy`. There's no code to run in that exercise. +The goal of this exercise is to learn to optimize a multi-classification neural network. As learnt previously, the loss function used in binary classification is the log loss - also called in Keras `binary_crossentropy`. This function is defined for binary classification and can be extended to multi-classification. In Keras, the extended loss that supports multi-classification is `binary_crossentropy`. There's no code to run in that exercise. 1. Fill the chunk of code below in order to optimize the neural network defined in the previous exercise. Choose the adapted loss, adam as optimizer and the accuracy as metric. @@ -155,5 +155,5 @@ Preliminary: 1. Use the `LabelBinarizer` from Sckit-learn to create a one hot encoding of the target. As you know, the output layer of a multi-classification neural network shape is equal to the number of classes. The output layer expects to have a target with the same shape as its output layer. 2. Train a neural network on the train set and predict on the test set. The neural network should have 1 hidden layers. The expected **accuracy** on the test set is minimum 90%. - _Hint_: inscrease the number of epochs + _Hint_: increase the number of epochs **Warning**: Do no forget to evaluate the neural network on the **SCALED** test set.