How do I export a machine learning model to use later on my own computer or someone else's?

7 views (last 30 days)
The documentation seems to assume use of some kind of classification learner app http://www.mathworks.com/help/stats/export-classification-model-for-use-with-new-data.html, but I just made calls like "linearmdl = fitlm(X,y)" in my code (using the machine learning toolbox).
I want to be able to make new predictions without having to retrain my model each time, and I also want to share my model with my friend. Thanks!
Edit. I just read this, "You can save the resulting CompactTreeBagger model in a *.mat file," when I was going through http://www.mathworks.com/help/stats/ensemble-methods.html?refresh=true#zmw57dd0e58447.
So to clarify my question, how do I actual save the resulting model? It looks like I don't need anything fancy like the Matlab compiler.

Accepted Answer

Stalin Samuel
Stalin Samuel on 3 Aug 2015
  1 Comment
El Baboon
El Baboon on 5 Aug 2015
Do you know how I can simply save my own model on my own computer without having to retrain it every time?
I can't download the Matlab compiler under the trial license and Matlab coder won't work because I'm using non-translatable machine learning functions, but it seems like there should be a workaround so that I can at least use my own model without having to wait several hours in between.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!