Borrar filtros
Borrar filtros

adding noise increased accuracy after training

1 visualización (últimos 30 días)
Tomasz Kaczmarski
Tomasz Kaczmarski el 17 de Mzo. de 2020
Comentada: Tomasz Kaczmarski el 21 de Mzo. de 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);

Respuestas (1)

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

Iniciar sesión para comentar.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by