Question Overview
In general this question is in regards to how to tweak the parameters used when one specifies a Method when calling the Predict
function. Herein the examples focus more on Random Forests - although the question is valid for the other Method options of Predict
. The specific questions follow the the example for better clarify.
Backgound
Mathematica's Predict
function is pretty nifty. It quickly makes a model depending on the "Method" given as an option. The parameters that underly that, however, to me are obscure.
Example
Consider one wants to construct a Random Forest, on their Dataset
, data, to predict a column called "output."
Then the code for implementing this would be:
rf=Predict[data->"output", Method->"RandomForest"];
To get information about the model:
PredictorInformation[rf];
And we see something like:
Predictor information
Method | Random Forest
Number of features | Dimensions[data][[2]]-1
Number of training examples | Dimensions[data][[1]]
Number of tress | 50
Note
The method Random Forest, as stated in the Mathematica documentaiton, follows the Breiman-Cutler ensembles of decision trees. Click for Breiman-Cutler Documentation , or Click for Mathematica's Predict Documentation
Question 1
How can we modify this model? e.g. what if I want 100 trees? How can I use mtry
? What if I wanted to use only 85 features?
Question 2
What are the underlying methods of this model? e.g. Does it make use of cross fold validation? If not, can we average 10 models together? Does it automatically scale the data?
Question 3
ROC curve?
So in general, knowing that Method -> "RandomForest" uses Breiman-Cutler ensembles, how can we tweak Predict
?
Extension
Likewise, how could one do this for the other methods of Predict
?