# Understanding RPART model results

I have operational fault data and maintenance data. The operational fault data was used to determine if the maintenance improved the fault indicator (true/false). The maintenance data was used to identify what maintenance actions were performed. RPART was used to generate a model, with the maintenance actions as independent variables and operational fault reduction as the categorical output data (true/false). 0.5 was subtracted from the operational fault data so the values were -0.5, 0.5 instead of 0, 1.

I don't understand how to interpret the meaning of the plot of the rtree model. How to determine, or indicate, which of the bottom nodes correspond to true or false? Also, what do the colors indicate.

R commands

subdata <- data.frame(x="maintenance actions", y="Fault improved"-0.5)
rtreeFit <- rpart(y ~ .,data=subdata)
fancyRpartPlot(rtreeFit,main=paste('RPART:'),sub=cName)


Is it possible to draw a histogram for each leaf showing the distribution of classifications?

Here's the updated code

y_subdata = factor(y_training[rowIndx])
x_subdata = x_training[rowIndx, ]
subdata<-data.frame(x=x_subdata,y=y_subdata)
fit <- rpart(y ~ .,method='class',data=subdata,
control=rpart.control(minsplit=3,cp=0.0001))


The numbers are hard to read, but what do the numbers mean?