train, test ,validation confusion matrix

44 ビュー (過去 30 日間)
Yogini Prabhu
Yogini Prabhu 2021 年 1 月 22 日
コメント済み: Yogini Prabhu 2021 年 2 月 20 日
while the a confusion matrix is a map of correct and incorrect classifications; what are train ,test,validation confusion matrices? what is their meaning
  2 件のコメント
Adam Danz
Adam Danz 2021 年 1 月 23 日
This question is better for an internet search engine. There are lots of tutorials and videos out there. For example,
If you have a matlab related question, you're in the right place.
Yogini Prabhu
Yogini Prabhu 2021 年 1 月 25 日
Thanks Adam, but I had seen the given web-page earlier. I wanted to know meaning about individual confusin matrices; train ,test ,validate

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

採用された回答

Shubham Rawat
Shubham Rawat 2021 年 1 月 27 日
Hi Yogini,
Confusion Matrices:
These are to evaluate the quality of the output of a classifier on the data set. The diagonal elements represent the number of points for which the predicted label is equal to the true label, while off-diagonal elements are those that are mislabeled by the classifier. The higher the diagonal values of the confusion matrix the better, indicating many correct predictions.
Train, Test , Validation Confusion matrices:
They uses different data for creating confusion matrix. For train confusion matrix it uses predicted values and actual values from train data. Similarly for the other confusion matrices.
You may also refer to the answer to this question:
Hope this helps!
  5 件のコメント
Shubham Rawat
Shubham Rawat 2021 年 2 月 5 日
Hi Yogini,
Here is the code for this using Cancer dataset:
load cancer_dataset.mat
inputs = cancerInputs;
targets = cancerTargets;
% Create a Pattern Recognition Network
hiddenLayerSize = 10;
net = patternnet(hiddenLayerSize);
% Set up Division of Data for Training, Validation, Testing
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;
% Train the Network
[net,tr] = train(net,inputs,targets);
%plot confusion matrix for training
yTrn = net(inputs(:,tr.trainInd));
tTrn = targets(:,tr.trainInd);
figure, plotconfusion(tTrn,yTrn,'Training');
%plot confusion matrix for validation
yVal = net(inputs(:,tr.valInd));
tVal = targets(:,tr.valInd);
figure, plotconfusion(tVal,yVal,'Valdation');
%plot confusion matrix for testing
yTst = net(inputs(:,tr.testInd));
tTst = targets(:,tr.testInd);
figure, plotconfusion(tTst,yTst,'Testing');
Hope this Helps!
Yogini Prabhu
Yogini Prabhu 2021 年 2 月 20 日
'The diagonal elements represent the number of points for which the predicted label is equal to the true label, while off-diagonal elements are those that are mislabeled by the classifier.'
which is the prediction, and how is it implemented?

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

その他の回答 (1 件)

Yogini Prabhu
Yogini Prabhu 2021 年 2 月 8 日
編集済み: Yogini Prabhu 2021 年 2 月 20 日
okay. i wil try out that, how about ROcs of the same? can i get an example of a confusion matrix (with not classification rate of 100% )and its corresponding ROC.

Community Treasure Hunt

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

Start Hunting!

Translated by