Borrar filtros
Borrar filtros

Combining N pattern classifiers using weighted majority voting in Matlab

3 visualizaciones (últimos 30 días)
I want to combine some classifiers. The number of classifiers is 4 and there are 3 possible classes. I came a cross this code: "Efficient multiclass weighted majority voting implementation in MATLAB". It makes use of 3 classifiers and 3 possible classes. I have tried to customize it for use with 4 classifiers and 3 possible classes without success. How can this code be extended for use in my case, or to N classifiers. Or is there any other code applicable to my case. Please help.

Respuestas (1)

kh rezaee
kh rezaee el 29 de En. de 2020
Editada: kh rezaee el 29 de En. de 2020
I think that your problem is near this code:
voteWeightsSUM = sum(voteWeights);
W = voteWeights/(voteWeightsSUM);
outPut = (testPredictions(:,1)*W(1)+testPredictions(:,2)*W(2)+testPredictions(:,3)*W(3)+testPredictions(:,4)*W(4));
VotingConfusionMatrix = confusionmat(TestLabel,outPut);
softVotingAccuracy = sum(diag(VotingConfusionMatrix))/sum(VotingConfusionMatrix(:));
Where, voteWeights and testPredictions are accuracy and predicted test labels of each classifier, respectively. Also, voteWeights comes from the training phase, but testPredictions is calculated based on trained models.

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

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

Start Hunting!

Translated by