I'm working on doing an analysis on predicting wine quality based on a number of characteristics present in the wine. I'm grouping wine into 2 categories: 1 being 'High Quality' and 0 being 'Average Quality'.
After performing model selection to determine which model resulted in the lowest overall error rate, I'm wanting to use Random Forests in order to further my analysis. After determining the optimal value of mtry (what number of variables considered at each split produces the lowest overall error rate), I run a Random Forest on my data using that value.
My random forest results are as I expect, and I was curious if there is a good way to visualize a sample tree from the forest? Or any other visualizations that will help me explain the results (I'm already creating importance plots for each of the variables).
Any thoughts?
Results from determining most optimal mtry value:
Current Code:
set.seed(8, sample.kind = "Rounding")
wine.bag=randomForest(quality01 ~ alcohol + volatile_acidity + sulphates + residual_sugar +
chlorides + free_sulfur_dioxide + fixed_acidity + pH + density +
citric_acid,data=wine,mtry=3,importance=T)
wine.bag
plot(wine.bag)
importance(wine.bag)
varImpPlot(wine.bag)
test=wine[,c(-12,-13,-14)]
rest=cor(test)
corrplot(rest, type = "upper", order = "hclust",
tl.col = "black", tl.srt = 45)
```