How to train SVM

2 vues (au cours des 30 derniers jours)
neha gautam
neha gautam le 8 Mai 2018
Hi, Is there anyone who will help me in SVM for classification in Matlab code. i have completed my work until feature extraction and after feature extraction, I have created mxn size of the matrix where n is the number of samples and mx1 is the array of each image/character.
Please guide that, how I have to arrange the training dataset that I can train SVM.

Réponse acceptée

Walter Roberson
Walter Roberson le 8 Mai 2018
"Input Arguments:
Train: Matrix of training data, where each row corresponds to an observation or replicate, and each column corresponds to a feature or variable."
That is already the form that your indicate your data is in, so you do not need to do anything further to prepare it. Just call
svmtrain(YourMatrix, Vector_of_target_information)
  5 commentaires
Walter Roberson
Walter Roberson le 8 Mai 2018
What is class(tar) and size(tar) ?
neha gautam
neha gautam le 8 Mai 2018
My training dataset is 26x2600 and target is 1x2600, I have solved the previous error. now I get a new one.

Connectez-vous pour commenter.

Plus de réponses (2)

Ameer Hamza
Ameer Hamza le 8 Mai 2018
The easiest way to get started and visualize is to use Classification Learner App. Start it using this command
classificationLearner
Then you can start a new session. Import your data. In the model type choose SVM. Several SVM models are available. Choose advanced and choose advanced training options. Then press train to start training. When Training is complete, it will visualize result using several graphs. You can also export the model to the workspace for further processing.

Sindhu
Sindhu le 5 Sep 2023
How to train SVM in satellite images?

Catégories

En savoir plus sur Image Data Workflows dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by