Multiclass SVM classifier
The provided MATLAB functions can be used to train and perform multiclass classification on a data set using a dendrogram-based support vector machine (D-SVM).
The two main functions are:
Train_DSVM: This is the function to be used for training
Classify_DSVM: This is the function to be used for D-SVM classification
Example: Training and classification using fisheriris data
load fisheriris
train_label={zeros(30,1),ones(30,1),2*ones(30,1)};
train_cell={meas(1:30,:),meas(51:80,:),meas(101:130,:)};
[svmstruct] = Train_DSVM(train_cell,train_label);
label=[0 1 2];
test_mat=[meas(31:40,:);meas(81:90,:);meas(131:140,:)];
[Class_test] = Classify_DSVM(test_mat,label,svmstruct);
labels=[zeros(1,10),ones(1,10),2*ones(1,10)];
[Cmat,DA]= confusion_matrix(Class_test,labels,{'A','B','C'});
Cite As
Tarek Lajnef (2024). Multiclass SVM classifier (https://www.mathworks.com/matlabcentral/fileexchange/48632-multiclass-svm-classifier), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
DSVM/
Version | Published | Release Notes | |
---|---|---|---|
1.7.0.0 | adding level variable; variable defined in train_dsvm function and used in classify_dsvm |
||
1.6.0.0 | fiing some bugs |
||
1.5.0.0 | Add confusion_matrix, |
||
1.4.0.0 | Title + Tags |
||
1.3.0.0 | Tag |
||
1.2.0.0 | Title |
||
1.1.0.0 | toolbox |
||
1.0.0.0 |
|