adding noise increased accuracy after training
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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);
0 comentarios
Respuestas (1)
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.
Ver también
Categorías
Más información sobre Define Shallow Neural Network Architectures en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!