I used the tree bagger function to create a random forest model for obtained trained classifier.
Used function:
%Create a Random Forest model with 100 trees,
randomfmodel = TreeBagger(...............)
Is there a way I could export the model values generated directly ( in form of values and weights ) so that it can be used on a c++ platform.
i read that the matlab runtime is large and basically that is the reason why I want to use the generated weights and parameters from matlab model and then export it and write a code for testing new data in c++ I am trying to avoid rewriting the code in C++ for training . (Using the model values from matlab will help me directly test on new data.)
I do have a randomfmodel.mat file in matlab . Is there a way I could export all the weights so that I could rewrite a function in c++ to use it for testing new data?
I haven't tried it myself but found the following. The description of the files promise exactly what you are looking for: https://github.com/kenders2000/decisionTreeMat2Cpp
https://github.com/dhasenfratz/TreeBagger-Matlab2Cpp