Classification multiclasse

Introduction à Deep Learning avec Keras

Miguel Esteban

Data Scientist & Founder

Lancer des fléchettes

Introduction à Deep Learning avec Keras

L'ensemble de données

Introduction à Deep Learning avec Keras

L'ensemble de données

Introduction à Deep Learning avec Keras

L'architecture

Introduction à Deep Learning avec Keras

L'architecture

Introduction à Deep Learning avec Keras

L'architecture

Introduction à Deep Learning avec Keras

La couche de sortie

Introduction à Deep Learning avec Keras

Modèle multiclasse

# Instantiate a sequential model
# ...

# Add an input and hidden layer # ...
# Add more hidden layers # ...
# Add your output layer model.add(Dense(4, activation='softmax')
Introduction à Deep Learning avec Keras

Entropie croisée catégorielle

model.compile(optimizer='adam', loss='categorical_crossentropy')

Introduction à Deep Learning avec Keras

Préparer un ensemble de données

import pandas as pd
from tensorflow.keras.utils import to_categorical

# Load dataset
df = pd.read_csv('data.csv')

# Turn response variable into labeled codes df.response = pd.Categorical(df.response) df.response = df.response.cat.codes
# Turn response variable into one-hot response vector y = to_categorical(df.response)
Introduction à Deep Learning avec Keras

Encodage one-hot

Introduction à Deep Learning avec Keras

Passons à la pratique !

Introduction à Deep Learning avec Keras

Preparing Video For Download...