Binaire classificatie

Introductie tot Deep Learning met Keras

Miguel Esteban

Data Scientist & Founder

Wanneer binaire classificatie gebruiken?

Introductie tot Deep Learning met Keras

Onze dataset

Introductie tot Deep Learning met Keras

Pairplots

import seaborn as sns

# Plot a pairplot
sns.pairplot(circles, hue="target")

Introductie tot Deep Learning met Keras

Introductie tot Deep Learning met Keras

Introductie tot Deep Learning met Keras

Introductie tot Deep Learning met Keras

Introductie tot Deep Learning met Keras

Introductie tot Deep Learning met Keras

De sigmoidfunctie

Introductie tot Deep Learning met Keras

Laten we bouwen

from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense

# Instantiate a sequential model model = Sequential()

Introductie tot Deep Learning met Keras

Laten we bouwen

from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense

# Instantiate a sequential model model = Sequential()
# Add input and hidden layer model.add(Dense(4, input_shape=(2,), activation='tanh'))

Introductie tot Deep Learning met Keras

Laten we bouwen

from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense

# Instantiate a sequential model model = Sequential()
# Add input and hidden layer model.add(Dense(4, input_shape=(2,), activation='tanh'))
# Add output layer, use sigmoid model.add(Dense(1, activation='sigmoid'))

Introductie tot Deep Learning met Keras

Compilen, trainen, voorspellen

# Compile model
model.compile(optimizer='sgd',
              loss='binary_crossentropy')

# Train model model.train(coordinates, labels, epochs=20)
# Predict with trained model preds = model.predict(coordinates)
Introductie tot Deep Learning met Keras

Introductie tot Deep Learning met Keras

Laten we oefenen!

Introductie tot Deep Learning met Keras

Preparing Video For Download...