Why does SVM take several MBs?

前端 未结 1 1293
忘掉有多难
忘掉有多难 2021-01-24 04:45

The MATLAB Classification Learner App creates an SVM, which takes 4 MB memory space. Why so much? As far as I know, the SVM has to learn only a few coefficients of the hyper-pla

相关标签:
1条回答
  • 2021-01-24 05:17

    Classification Learner App has two export options - Export Model, and Export Compact Model.

    If you choose Export Model you'll get an object of class ClassificationSVM - this contains not only the model itself, but also the data used for training, which are needed if you later want to create various diagnostic plots or calculate performance measures. This may explain the size you're seeing.

    If you choose Export Compact Model, you'll get an object of class CompactClassificationSVM, which contains just the model itself. This can only be used for prediction, and not the diagnostic plots and measures described earlier. As it's an object, it will still take up more memory than just a simple array of coefficients - but it should be quite a bit smaller than the ClassificationSVM, as it doesn't store the training data.

    0 讨论(0)
提交回复
热议问题