MATLAB Answers

Is it possible to save matlab classifier workspace?

4 views (last 30 days)
Zeynab Mousavikhamene
Zeynab Mousavikhamene on 9 Mar 2020
Commented: Ameer Hamza on 12 Oct 2020 at 6:49
I need to save matlab classifier workspace so that later I can do some processes without the need to run the models from the scratch. Is this possible?

  0 Comments

Sign in to comment.

Answers (1)

Ameer Hamza
Ameer Hamza on 9 Mar 2020
Edited: Ameer Hamza on 9 Mar 2020
You can use save function to save any MATLAB variable in a .mat file. For example,
load ionosphere
tc = fitctree(X,Y);
save('classification_model.mat', 'tc');
Then you can load the trained model using
load('classification_model.mat');

  4 Comments

Show 1 older comment
Ameer Hamza
Ameer Hamza on 9 Mar 2020
I got it now. It appears this feature is not added to the classification learner app yet. The closest thing right now is to export the model to base workspace and save them in a mat file. However, in that case, you cannot load them into the classification learner app again.
Amelia
Amelia on 11 Oct 2020 at 23:43
@ Ameer Hamza i have the same problem, i have trained some classifiers and save them in 7.3 format, but when i try to load them they donnot load. they have been load many times but after some time they didnot load any more!!
Ameer Hamza
Ameer Hamza on 12 Oct 2020 at 6:49
What happen when you try to load them? Is there any error? Try saving in v7 format.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by