reached at maximum depth once tree got maximum number of terminal nodes minimum node recordsit may be defined as the minimum number of training patterns that given node is responsible for we must stop adding terminal nodes once tree reached at these minimum node records or below this minimum terminal node is used to make final prediction part recursive splitting as we understood about when to create terminal nodesnow we can start building our tree recursive splitting is method to build the tree in this methodonce node is createdwe can create the child nodes (nodes added to an existing noderecursively on each group of datagenerated by splitting the datasetby calling the same function again and again prediction after building decision treewe need to make prediction about it basicallyprediction involves navigating the decision tree with the specifically provided row of data we can make prediction with the help of recursive functionas did above the same prediction routine is called again with the left or the child right nodes assumptions the following are some of the assumptions we make while creating decision treewhile preparing decision treesthe training set is as root node decision tree classifier prefers the features values to be categorical in case if you want to use continuous values then they must be done discretized prior to model building based on the attribute' valuesthe records are recursively distributed statistical approach will be used to place attributes at any node position as root node or internal node implementation in python example in the following examplewe are going to implement decision tree classifier on pima indian diabetesfirststart with importing necessary python packagesimport pandas as pd from sklearn tree import decisiontreeclassifier from sklearn model_selection import train_test_split