Binary classification

Deep Learning เบื้องต้นด้วย Keras

Miguel Esteban

Data Scientist & Founder

ควรใช้ binary classification เมื่อใด?

Deep Learning เบื้องต้นด้วย Keras

ชุดข้อมูลของเรา

Deep Learning เบื้องต้นด้วย Keras

Pairplots

import seaborn as sns

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

Deep Learning เบื้องต้นด้วย Keras

Deep Learning เบื้องต้นด้วย Keras

Deep Learning เบื้องต้นด้วย Keras

Deep Learning เบื้องต้นด้วย Keras

Deep Learning เบื้องต้นด้วย Keras

Deep Learning เบื้องต้นด้วย Keras

ฟังก์ชัน sigmoid

Deep Learning เบื้องต้นด้วย Keras

มาสร้างกันเลย

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

# Instantiate a sequential model model = Sequential()

Deep Learning เบื้องต้นด้วย Keras

มาสร้างกันเลย

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

Deep Learning เบื้องต้นด้วย Keras

มาสร้างกันเลย

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

Deep Learning เบื้องต้นด้วย Keras

การ compile, train และ predict

# 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)
Deep Learning เบื้องต้นด้วย Keras

Deep Learning เบื้องต้นด้วย Keras

มาฝึกกันเถอะ!

Deep Learning เบื้องต้นด้วย Keras

Preparing Video For Download...