February 2019
Beginner to intermediate
382 pages
10h 1m
English
This is a bonus section where we implement logistic regression with TensorFlow and use click prediction as example. We herein use 90% of the first 300,000 samples for training, the remaining 10% for testing, and assume that X_train_enc, Y_train, X_test_enc, and Y_test contain the correct data.
>>> import tensorflow as tf>>> n_features = int(X_train_enc.toarray().shape[1])>>> learning_rate = 0.001>>> n_iter = 20
Read now
Unlock full access