[c] = confusion(t,y) and not classified observations
조회 수: 4 (최근 30일)
이전 댓글 표시
Hi
[c] = confusion(t,y)
[c] its Confusion value = fraction of samples misclassified
but output of code bellow can be values:
1)classified correctly
2)classified incorrectly
3)not classified
net = fitnet(hl,trainFcn)
[net,tr] = train(net,x,t);
y = net(x)
[c] = confusion(t,y)
if im getting c = 0 it mean all values were classified correctly but it will consider values which were not classified ?
댓글 수: 0
답변 (1개)
Srivardhan Gadila
2020년 3월 28일
편집: Srivardhan Gadila
2020년 3월 28일
The fitnet function is used for regression. The confusion matrix is used for classification problems.
Function fitting is the process of training a neural network on a set of inputs in order to produce an associated set of target outputs. After you construct the network with the desired hidden layers and the training algorithm, you must train it using a set of training data. Once the neural network has fit the data, it forms a generalization of the input-output relationship. You can then use the trained network to generate outputs for inputs it was not trained on.
댓글 수: 3
Srivardhan Gadila
2020년 3월 29일
@Tomasz Kaczmarski, Try the following in MATLAB:
help simpleclass_dataset
[x,t] = simpleclass_dataset;
plot(x(1,:),x(2,:),'+')
net = patternnet(10);
net = train(net,x,t);
view(net)
y = net(x)
plotconfusion(t,y)
% or use the below one
[c,cm,ind,per] = confusion(t,y)
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!