classification_trees/

directory
v0.0.0-...-91b80fc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2018 License: Apache-2.0

README

Classification - Decision Trees

In addition to kNN, decision tree and random forest algorithms are widely used for classification problems. In a decision tree algorithm, a tree of if/then statements is created based on the features and labeled points of a training set. In a random forest algorithm, many decision trees are built and the results are combined (a type of "ensemble" model). In these examples, we will explore individual Decision trees.

Decision Trees

alt tag
from Wikipedia

Notes

  • "Single decision trees are highly interpretable. The entire model can be completely represented by a simple two-dimensional graphic (binary tree)" - from The Elements of Statistical Learning
  • Each level of a decision tree splits the data according to different attributes.
  • Decision trees perform best when a small number of attributes provide most of the information needed to classify observations.

Introduction to learning and decision trees

Code Review

Train and use cross-validation to validate a single decision tree
Tuning the pruning parameter of the decision tree

Exercises

Exercise 1

Visualize the accuracies for each of the pruning parameters used in example2. This should help you quickly identify what parameter would be best for our model.

Template | Answer


All material is licensed under the Apache License Version 2.0, January 2004.

Directories

Path Synopsis
Sample program to train and validate a decision tree model with cross validation.
Sample program to train and validate a decision tree model with cross validation.
Sample program to determine an optimal value of the decision tree pruning parameter.
Sample program to determine an optimal value of the decision tree pruning parameter.
exercises
exercise1
Sample program to visualize the accuracy of models with various decision tree pruning parameters.
Sample program to visualize the accuracy of models with various decision tree pruning parameters.
template1
Sample program to visualize the accuracy of models with various decision tree pruning parameters.
Sample program to visualize the accuracy of models with various decision tree pruning parameters.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL