Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Random Forest model output - MSE available?


Hello all, 


I am trying to extract data from the model output of various predictive tools, but mainly Random Forest. 

After learning a bit of R, I can extract the IncNodePurity using the 'importance' call like so: <- read.Alteryx("#1")
the_obj <- unserializeObject(as.character($Object[1]))

the_summary <- summary(the_obj)
the_importance <- importance(the_obj)

write.Alteryx(, 1, TRUE)
write.Alteryx(, 2, TRUE)

Importance gives the Node Purity but MSE is more accurate and I would prefer to output this instead. Only, I can't find a reliable way to call %IncMSE from the R tool. Does anyone know how to extract this, and more generally is there a place with comprehensive documentation of these? The 'Tool Mastery' pages are not detailed enough!


As a side note, It seems bizarre that the tools would output PNG of the data in the Reports but have a not have a formatted, tabular output as well. It would certainly save me some time. Is this in the pipeline?


Hello @samstafford,


Since the Forest Model tool uses the RandomForest package, it might be a good idea to check out the documentation for that package: randomForest

Random Forest Package.png


As for pulling the %IncMSE, here are a few articles that may help you further develop your custom code: - importance(rf,type=1)


Also, if you think it would be a valuable feature for the predictive tools to output Reports as a data stream, here is a post on our ideas page that you can star/comment on:


Hoss Carroll
Customer Support Engineer

Hello Hoss,


Thanks for your suggestions.

After looking through the documentation for randomForest and the stackexchange posts I am still unable to extract the values. Your sources explicitly say that IncMSE and IncNodePurity are both returned when calling rf$importance or importance(rf), but Alteryx using the R tool only returns IncNodePurity. It's almost as if Alteryx is using a non-standard randomForest package?


For the record the output says I'm using randomForest 4.6-14

Alteryx Certified Partner
Alteryx Certified Partner

You could try using the model comparison tool, which is available on the gallery.!app/Model-Comparison/56bbd3013df7da08b8fcd00a


The purpose of the tool is to compare the output of multiple models, but it can be used for just a single model too, it will return the RMSE, MAE, MPE and MAPE values.