How to adapt the matlab code which is produced by classification learner?

Illustration
ZaidAlyasseri - 2024-05-24T13:26:20+00:00
Question: How to adapt the matlab code which is produced by classification learner?

I have EEG dataset which is content 109 subjects and the EEG signals recorded from 64 electrodes. While the AR coefficients extracted as features. Then I tested these features using classification learner App . I found the best results obtain with Cubic SVM classifier. So my question how can I used the Cubic SVM as a function for further experiments.

Expert Answer

Profile picture of Kshitij Singh Kshitij Singh answered . 2025-11-20

Hi,

The MATLAB Classification Learner app provides a user-friendly way to train and evaluate classification models. After training a model, you can export the model and the corresponding code for customization or integration into larger projects.

You can export the model in 3 ways. Usually the best way is to export matlab code to perform further calculations and change it the way you need for your purpose.
 
To do this choose the little arrow on the export button and choose the option you need. After this you have a script or a struct in workspace (depending on the option you choosed). The script contains a good commented description how to perform new predictions / classifications.
 
If you export the model you find an example how to make predictions with new data in the command window. If you follow these instructions it is pretty easy to use it. Just save as a .mat file for future and use it.


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!