フィルターのクリア

adding noise increased accuracy after training

1 回表示 (過去 30 日間)
Tomasz Kaczmarski
Tomasz Kaczmarski 2020 年 3 月 17 日
コメント済み: Tomasz Kaczmarski 2020 年 3 月 21 日
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.
  1 件のコメント
Tomasz Kaczmarski
Tomasz Kaczmarski 2020 年 3 月 21 日
thank you for explanation
in this case how i can modify raw data to decrase accuracy ?

サインインしてコメントする。

製品

Community Treasure Hunt

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

Start Hunting!

Translated by