フィルターのクリア

I have a code of multiplayer perceptron , which i have modified for 10 cross validation. but the confusion matrix in final display is not understandable. can someone please

1 回表示 (過去 30 日間)
ammu v
ammu v 2021 年 7 月 31 日
編集済み: ammu v 2021 年 8 月 3 日
%% i have 184 subjects, i cant decipher the confusiion matrix
feat = classi_tau4_norm(:,1:16);
labels = classi_tau4_norm(:,17)
fold = cvpartition(labels,'kfold',10);
r=1;
net = patternnet(6);
while r<=10
trainIdx=fold.training(r); testIdx=fold.test(r);
xtrain=feat(trainIdx,:); ytrain=labels(trainIdx);
xtest = feat(testIdx,:); ytest = labels(testIdx);
train_data=[ytrain xtrain];
test_data = [ytest xtest];
net = train(net,xtrain',ytrain');
%view(net)
y_pred = net(xtest');
perf = perform(net,ytest,y_pred');
end

回答 (1 件)

Amogh Bhole
Amogh Bhole 2021 年 8 月 3 日
From my understanding the confusion matrix you obtained is a result of binary classification problem. Also, I am not able to find where you are plotting the confusion matrix in the code provided. I can see from the image that you have obtained four confusion matrices. However, these confusion matrices mean as follows:
  1. Training Confusion Matrix: This matrix gives the information on the data used during training it will be on the random nine folds.
  2. Validation Confusion Matrix: Since you are using cross validation technique, the matrix is obtained on the random tenth fold which is used for validation during training.
  3. Test Confusion Matrix: For each iteration it will give the confusion matrix for the testing data used.
  4. All Confusion Matrix: For each iteration it will give the combined information of the above three matrices.
Please refer to this link in order to find more ways to plot the confusion matrix.
  1 件のコメント
ammu v
ammu v 2021 年 8 月 3 日
編集済み: ammu v 2021 年 8 月 3 日
i didnt write any code for generating confusion matrix, it was generating automatically. I wanted to obtain a proper confusion matrix with total TP,TN,FP,FN.However i am unable to extract with this code.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeStatistics and Machine Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by