TensorFlow has included some default model estimator functions that we will rely on for this recipe. There are two main gradient-boosted models, a regression-tree and a classification-tree. For this example, we will be using a regression tree to predict the boston house price dataset (https://www.cs.toronto.edu/~delve/data/boston/bostonDetail.html).
- To start we load the necessary libraries:
import numpy as npimport tensorflow as tffrom keras.datasets import boston_housingfrom tensorflow.python.framework import opsops.reset_default_graph()
- Next, we set the model we are going to use from the TensorFlow estimator library. Here, we will use the BoostedTreesRegressor model, which is used for regression with gradient boosted ...