Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MATLAB SVMStruct (obtained from svmtrain) save in a file and read it later

Tags:

matlab

svm

Is there a way by which I could write an SVMStruct (obtained using Matlab's svmtrain) to a file and then read it later when I need it. I want to do this because I'm unable to use SVMclassify after training the data, it gives out of memory error.

like image 345
Kanwal Prakash Singh Avatar asked Dec 04 '25 17:12

Kanwal Prakash Singh


1 Answers

You can just use save to save:

svmstruct=svmtrain(........
save('file2save.mat','svmstruct');

and load to reload it later:

load('file2save.mat','svmstruct');
svmclassify(svmstruct,.........
like image 195
Oli Avatar answered Dec 06 '25 10:12

Oli