Question: # Load the rpart library library ( rpart ) # Develop two decision trees tree _ gini < - rpart ( TARGET _ BAD _
# Load the rpart library
libraryrpart
# Develop two decision trees
treegini rpartTARGETBADFLAG ~ data data, method "class", parms listsplit "gini"
treeentropy rpartTARGETBADFLAG ~ data data, method "class", parms listsplit "information"
# Plot both decision trees
plottreegini
texttreegini
plottreeentropy
texttreeentropy
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
