adding noise increased accuracy after training

3 vues (au cours des 30 derniers jours)
Tomasz Kaczmarski
Tomasz Kaczmarski le 17 Mar 2020
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);

Réponses (1)

Mahesh Taparia
Mahesh Taparia le 20 Mar 2020
Hi
Noise addition acts as regularizer and it reduce overfitting. The model becomes more robust, so the accuracy of the model increases.
  1 commentaire
Tomasz Kaczmarski
Tomasz Kaczmarski le 21 Mar 2020
thank you for explanation
in this case how i can modify raw data to decrase accuracy ?

Connectez-vous pour commenter.

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by