İkili sınıflandırma

Keras ile Deep Learning'e Giriş

Miguel Esteban

Data Scientist & Founder

İkili sınıflandırma ne zaman kullanılır?

Keras ile Deep Learning'e Giriş

Veri kümemiz

Keras ile Deep Learning'e Giriş

Çift grafikler (pairplot)

import seaborn as sns

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

Keras ile Deep Learning'e Giriş

Keras ile Deep Learning'e Giriş

Keras ile Deep Learning'e Giriş

Keras ile Deep Learning'e Giriş

Keras ile Deep Learning'e Giriş

Keras ile Deep Learning'e Giriş

Sigmoid fonksiyonu

Keras ile Deep Learning'e Giriş

Hadi oluşturalım

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

# Instantiate a sequential model model = Sequential()

Keras ile Deep Learning'e Giriş

Hadi oluşturalım

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'))

Keras ile Deep Learning'e Giriş

Hadi oluşturalım

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'))

Keras ile Deep Learning'e Giriş

Derleme, eğitim, tahmin

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

Keras ile Deep Learning'e Giriş

Hadi pratik yapalım!

Keras ile Deep Learning'e Giriş

Preparing Video For Download...