Posts

Showing posts with the label Decision Tree Classification in Python

Decision Tree Classification in Machine Learning

Image
 What is Decision Tree Classification? A  decision tree  is a graphical representation of all the possible solutions to a  decision  based on certain conditions. It's called a  decision tree  because it starts with a single box (or root), which then branches off into a number of solutions, just like a  tree . Lets see one example : is person salary >>> 100 K $ ? if we make a decision using  Decision Tree classification  then it look like above. lets say if person work in google and he/her has done master in computer then definitely his/her salary > 100 K $.    Decision Tree classification in Python : Import library first  Read the data sets  Now we create two data frame which contain our independent and dependent variable. Because we have to pass this variable as x and y in our model.   Now we all know ml does not  contain any categorical data but in our data frame columns name company job a...