<jupyter_start><jupyter_text>Gradient Boosted Decision TreeThis notebook will explore how to use a Gradient Boosted Decision Tree. The first example will use MNIST get it  [here](http://yann.lecun.com/exdb/mnist/)<jupyter_code>from __future__ import print_function

import tensorflow as tf
from tensorflow.contrib.boosted_trees.estimator_batch.estimator import GradientBoostedDecisionTreeClassifier
from tensorflow.contrib.boosted_trees.proto import learner_pb2 as gbdt_learner

import os
os.environ["CUDE_VISIBLE_DEVICES"] = ""<jupyter_output><empty_output><jupyter_text>Import the MINST Data<jupyter_code>tf.logging.set_verbosity(tf.logging.ERROR)
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("/tmp/data/", one_hot=False,
                                 source_url='http://yann.lecun.com/exdb/mnist/')
# parameters
batch_size = 4096 # num of samples per batch
num_classes = 10 # 10 digits
num_features = 784 # Each Image is 28x28 pixels
max_steps = 10000

# GBDT Parameter
learning_rate = 0.1
l1_regul = 0.
l2_regul = 1.
examples_per_layer = 1000
num_tress = 10
max_depth = 16
# Fill GBDT params into the config proto
learner_config = gbdt_learner.LearnerConfig()
learner_condfig.learning_rate_tuner.fixed.learning_rate = learning_rate<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.0797872340425532, 'fraction_numerical': 0.026595744680851064, 'mean_word_length': 5.585, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '389918', 'license': 'MIT', 'n_tokens_mistral': 487, 'n_tokens_neox': 445, 'n_words': 102, 'path': 'GBDT.ipynb', 'repo_name': 'AmoDinho/tensorflow-exploration', 'size': '1316'}