필터 지우기
필터 지우기

Multilayer neural network only slightly better than linear neural network

조회 수: 2 (최근 30일)
Triple G
Triple G 2020년 6월 22일
댓글: Aditya Patil 2020년 9월 22일
I have made a linear neural network with a hidden layer and a multilayer non-linear neural network with 3 hidden layers. Both of them get as input a matrix of this kind:
1.7300 1.9500 2.3800 1.4400 5.0000 4.7500 2.1000 3.2000 2.2500 1.3000
3.4000 3.2000 3.3000 3.7500 3.5000 3.4000 3.2000 3.4000 3.2500 5.2500
5.0000 3.0000 2.0000 7.0000 1.0000 1.0000 3.0000 2.0000 2.0000 9.0000
and have this kind of matrix as target:
0 0 0 1 0 0 0 0 1 1
1 1 0 0 0 1 1 0 0 0
0 0 1 0 1 0 0 1 0 0
The code for the first neural network is the following
function [trainClassificationRatio, testClassificationRatio] = feedForwardLinearNet(xTrain,tTrain, xTest,tTest)
rng ('default');
net = feedforwardnet(3);
net.layers{1}.transferFcn = 'purelin';
[net, tr, Ytrain] = train(net,xTrain,tTrain);
trueTrainClass = vec2ind(tTrain);
assignedTrainClass = vec2ind(Ytrain);
trainError = assignedTrainClass ~= trueTrainClass;
trainNumError = sum(trainError);
trainPctError = 100 * trainNumError / size(xTrain,2);
trainClassificationRatio = 100 - trainPctError;
Ytest = net(xTest);
trueTestClass = vec2ind(tTest);
assignedTestClass = vec2ind(Ytest);
testError = assignedTestClass ~= trueTestClass;
testNumError = sum(testError);
testPctError = 100 * testNumError / size(xTest,2);
testClassificationRatio = 100 - testPctError;
end
The code for the second non-linear multilayer neural network differs from the first only in this part:
net = feedforwardnet([6 6 6]);
net.layers{3}.transferFcn = 'softmax';
I have also used patternnet either with the default settings or with setting the output transfer function to logsig with no improvement. Why the accuracy of the 2 different NN's is almost the same?
  댓글 수: 1
Aditya Patil
Aditya Patil 2020년 9월 22일
Neural network accuracy can be affected by many factors. Can you elaborate more on what the accuracies are currently, so that better suggestions could be provided? Also, any information on the data size and features would be helpful.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by