Getting ready

Tree based algorithms are traditionally non-smooth, as they are based on partitioning the data to minimize the variance in the target outputs. Non-smooth methods do not lend themselves well to gradient based methods. TensorFlow relies on the fact that the functions used in the model are smooth and that it automatically calculates how to change the model parameters to minimize the function loss. The way that TensorFlow gets around this obstacle is to do a smooth approximation to a decision boundary. One can approximate a decision boundary with a softmax function or similar shaped function.

Decision trees will provide a hard split on a dataset through generating rules, for example, If x > 0.5, then move to this branch of the tree.... ...

Get TensorFlow Machine Learning Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.