unable to display training progress using SVM classifier

5 ビュー (過去 30 日間)
Teo
Teo 2021 年 9 月 11 日
コメント済み: Teo 2021 年 9 月 20 日
Hi,
i going through a research paper (A Transfer Learning Architecture Based on a Support Vector Machine for Histopathology Image Classification) where CNN fully connected layer are connected to a SVM classifer. However when i try to simulate the model as shown in the paper, i notice that the training progress are not displayed as compared to training CNN classifier. Below is the code that i used to simulate the model.
imds = imageDatastore('MerchData', 'IncludeSubfolders',true, 'LabelSource','foldernames');
[imdsTrain,imdsValidation] = splitEachLabel(imds,0.7);
testnet = alexnet
inputSize = testnet.Layers(1).InputSize
augimdsTrain = augmentedImageDatastore(inputSize(1:2),imdsTrain)
augimdsValidation = augmentedImageDatastore(inputSize(1:2),imdsValidation)
layer = 'fc8';
featuresTrain = activations(testnet,augimdsTrain,layer,'OutputAs','rows')
featuresTest = activations(testnet,augimdsValidation,layer,'OutputAs','rows');
whos featuresTrain
YTrain = imdsTrain.Labels;
YValidation = imdsValidation.Labels;
classifier = fitcecoc(featuresTrain,YTrain);
YPred = predict(classifier,featuresTest);
accuracy = mean(YPred == YValidation)
The training progress that i trying to simulate is as shown in the picture below where it is obtain from the research paper.
Thank you very much.

採用された回答

Prateek Rai
Prateek Rai 2021 年 9 月 13 日
To my understanding, you are trying to simulate a model where CNN fully connected layers are connected to a SVM classifer at the end and want to display the training progress.
Training progress can be dispalyed in different manner in case of SVM. You can display diagnostic messages instead during training by using the 'Verbose' name-value pair argument. It controls the amount of diagnostic information per binary learner that the software displays in the Command Window.
You can refer to verbose MathWorks documentation page to find more on 'Verbose' name-value pair in 'fitcecoc' function.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeClassification についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by