adding noise increased accuracy after training

1 次查看(过去 30 天)
Hello
I calculated noise in two different ways and each time i training im getting accuracy 100% for noise data and 99 for data without noise
can somone please advice me where i do mistake
train and target mat files avaliable under below link
purpose of noise is i would like to decrease data accuracy and then train on different parameters to compare training results
code
adding noise(50%)
TrainSetArray = load('TrainSetArray.mat')
TargetSet = load('TargetSet.mat')
%Add noise
noiseSignal = cos(5 * pi * 100 * TrainSetArray)+sqrt(5) * randn(size(TrainSetArray));
noiseSignal= num2cell(noiseSignal)
noiseSignal=cell2mat(noiseSignal)
TargetSet = Tbt(:,(563:563));%data.simplefitTargets';
TargetSet= table2array(TargetSet)
training
x = noiseSignal';
%x = TrainSetArray';
t = TargetSet';
trainFcn = 'trainlm'; % Levenberg-Marquardt backpropagation.
% Create a Fitting Network
hiddenLayerSize = 1;
net = fitnet(hiddenLayerSize,trainFcn);
% Setup 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,x,t);
% Test the Network
y = net(x);
e = gsubtract(t,y);
performance = perform(net,t,y)
%checkCheck accuracy- noise set get 100%, without noise (train target) get 99%
[c,cm,ind,per] = confusion(t,y)
fprintf('Percentage Correct Classification : %f%%\n', 100*(1-c));
fprintf('Percentage Incorrect Classification : %f%%\n', 100*c);

回答(1 个)

Mahesh Taparia
Mahesh Taparia 2020-3-20
Hi
Noise addition acts as regularizer and it reduce overfitting. The model becomes more robust, so the accuracy of the model increases.

产品

Community Treasure Hunt

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

Start Hunting!

Translated by