How to include the model created using TreeBagger in a user-defined function to predict responses using the model?
Show older comments
How to include the model created using TreeBagger in a user-defined function to predict responses using the model?
I have used TreeBagger to create a random forest model called "Mdl". Now, I want to include "Mdl" in a separate user-defined function.
The function takes some input, "inputX" and performs a predict(Mdl,inputX).
The result from "predict" is the output for the function.
How can the function call the "Mdl"?
Accepted Answer
More Answers (0)
Categories
Find more on Classification Ensembles in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!