Use RandomForest and Decision Tress to build your model of predicitng sales on train data and compare their performance on test data. Also get the variable importance plot for the model.
Use dataset "base_data.csv" to build a model.Variable names are self explanatory. Aim here is to build predictive model for predicting sales figures given other information related to counterfeit medicine selling operations.
Decision Tree, Random Forest Model, Pruning Trees, Terminal Nodes.
We will first build decision tree model followed by random forest classification model: The steps followed are given below:
RMSE by decision tree is 49925 and that by random forest is 49057. Hence random forest is little better model.
Decision tree with 6 terminal nodes.
Pruned tree plot showing optimised number of nodes.
Variable Importance plot showing medicine_MRP and Availability Rating as most important variables contributing to the model.