Çok sınıflı sınıflandırma

Keras ile Deep Learning'e Giriş

Miguel Esteban

Data Scientist & Founder

Dart atma

Keras ile Deep Learning'e Giriş

Veri kümesi

Keras ile Deep Learning'e Giriş

Veri kümesi

Keras ile Deep Learning'e Giriş

Mimari

Keras ile Deep Learning'e Giriş

Mimari

Keras ile Deep Learning'e Giriş

Mimari

Keras ile Deep Learning'e Giriş

Çıktı katmanı

Keras ile Deep Learning'e Giriş

Çok sınıflı model

# Instantiate a sequential model
# ...

# Add an input and hidden layer # ...
# Add more hidden layers # ...
# Add your output layer model.add(Dense(4, activation='softmax')
Keras ile Deep Learning'e Giriş

Kategorik çapraz entropi

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

Keras ile Deep Learning'e Giriş

Veri kümesini hazırlama

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)
Keras ile Deep Learning'e Giriş

One-hot kodlama

Keras ile Deep Learning'e Giriş

¡Vamos a practicar!

Keras ile Deep Learning'e Giriş

Preparing Video For Download...