필터 지우기
필터 지우기

How do I know what is the probability that this file belong to this class .wav

조회 수: 2 (최근 30일)
On the TransferLearningUsingGoogLeNetExample for images, the code was able to predict the class of the image with probability % that this file is belong to this class. I am trying to do that with "signal procssing example Classify Sound Using Deep Learning" example. Once I trained my model and test it with one file, I want the classifer to show this file belong to this class with %100, %70, %40 etc.
idx = randperm(numel(imdsValidation.Files),4);
figure
for i = 1:4
subplot(2,2,i)
I = readimage(imdsValidation,idx(i));
imshow(I)
label = YPred(idx(i));
title(string(label) + ", " + num2str(100*max(probs(idx(i),:)),3) + "%");
end
num2str(100*max(probs(idx(i),:)),3) + "%");
  댓글 수: 1
Ibrahim A
Ibrahim A 2019년 12월 3일
The last line of this code, they shows what probability of tested file to be in this class. The testing code on the "signal procssing example Classify Sound Using Deep Learning" example
wNoiseTest = 2*rand([N,1]) - 1;
classify(net,extract(aFE,wNoiseTest)')

댓글을 달려면 로그인하십시오.

채택된 답변

Ibrahim A
Ibrahim A 2019년 12월 4일
Yessss.. I figured it out :)
prob = predict(net,extract(aFE,wNoiseTest)');

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with Signal Processing Toolbox에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by