Neural Network - R value equal 1- Over-fitting or not?

5 ビュー (過去 30 日間)
Mustafa Al-Nasser
Mustafa Al-Nasser 2019 年 8 月 5 日
コメント済み: Image Analyst 2022 年 6 月 23 日
Dear All;
I built a neural network model for regression as shown below but I got an R value equal 0.99998 which is almost 1. Does this indicate that I have overfitting? If yes, then how can I prevent or avoid overfitting?
% Read input and output vaules
data=readtable ('GOSP_DATA_Final.xlsx','sheet','Data');
I1=data.Ta;
I2=data.LPPT_P;
I=[I1 I2];
I=I';
T=data.LR;
T=T';
% Normalization between -1 and 1
[I,ps] = mapminmax(I);
[T,ts] = mapminmax(T);
% Building Network
h= 10;
net= fitnet(h);
[net,tr] = train(net, I, T);
% Teting Neural networl
tInd= tr.testInd;
tstOutput=net(I(:,tInd));
tstOutput = mapminmax('reverse',tstOutput,ts);
T(tInd)= mapminmax('reverse',T(tInd),ts);
tstperformance = perform(net, T(tInd), tstOutput)
figure (1),
plotregression(T(tInd),tstOutput);

回答 (1 件)

Srivardhan Gadila
Srivardhan Gadila 2019 年 8 月 12 日
If the calculated R value is almost same for all the three Train, Test and Validation sets then your model is no near to Overfitting. If you observe that the calculated R for training set is more than that for validation and test sets then your network is Over fitting on the training set. You can refer to Improve Shallow Neural Network Generalization and Avoid Overfitting.
  1 件のコメント
Image Analyst
Image Analyst 2022 年 6 月 23 日
@Srivardhan Gadila, they will all be different, always. I think the question is : how much different can the R of the Training set be from the R of the Validation or Test set before overfitting begins to be a concern?

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

カテゴリ

Help Center および File ExchangeStatistics and Machine Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by