machine learning - Matlab: How can I store the output of "fitcecoc" in a database -
in matlab section, there's helpful example solve classification problems under "digit classification using hog features". can execute full script clikcing on 'open example'. however, i'm wondering if there's way store output of "fitcecoc" in database don't have keep training , classifying each , everytime run code. here section of code that's relevant question:
% fitcecoc uses svm learners , 'one-vs-one' encoding scheme. classifier = fitcecoc(trainingfeatures, traininglabels);
so, want store 'classifier' in database , retrieve following code:
predictedlabels = predict(classifier, testfeatures);
look @ database toolbox in matlab.
you save classifier variable in file:
save('classifier.mat','classifier')
and load before executing predict:
load('classifier.mat') predictedlabels = predict(classifier, testfeatures);
Comments
Post a Comment