February 2019
Beginner to intermediate
382 pages
10h 1m
English
This is a bonus section where we implement a random forest with TensorFlow. Let's take a look at the following steps and see how it is done:
>>> import tensorflow as tf>>> from tensorflow.contrib.tensor_forest.python import tensor_forest>>> from tensorflow.python.ops import resources
>>> n_iter = 20>>> n_classes = 2>>> n_features = int(X_train_enc.toarray().shape[1])>>> n_trees = 10>>> max_nodes = 30000
>>> x = tf.placeholder(tf.float32, shape=[None, ...