Setting the best training / validation ratio in a Neural Network
6 次查看(过去 30 天)
显示 更早的评论
I am using a Neural Network to make a regression, using 10% of data to test. But how can I set the ratio values of training and validation datasets?
3 个评论
Greg Heath
2019-1-16
FYI: The default ratios are 0.7/0.15/0.15
Do you ave a specific reason for not accepting them?
Greg
回答(1 个)
Greg Heath
2019-1-16
编辑:Greg Heath
2019-1-16
1. ALWAYS START WITH 10 DESIGNS USING THE MATLAB DEFAULT!
2. Then evaluate the results to determine what to modify.
3. For regression the default is FITNET. So, look at the codes in
help fitnet
and
doc fitnet
4. They are the same:
[ x, t ] = simplefit_dataset;
net = fitnet(H); % H = 10 hidden nodes
net = train(net,x,t);
view(net)
y=net(x);
perf = perform(net,t,y)
5. Since I don't trust "perform" , I add a normalized mean square error calculation which typically has a range from 0 to 1
NMSE = mse(t-y)/mse(t-mean(t)) % 0 <= NMSE <= 1
7. Search using
Greg NMSE
8. This is related to the familiar Rsquare (coefficient of determination) used in elementary statistics
(See any encyclopedia)
Rsquare = 1-NMSE
9. If successful, the next step is to try to obtain good results with the number of hidden nodes
H < 10
10. Otherwise, increase H.
11. I have a jillion examples in both the NEWSGROUP and ANSWERS.
PS: This format sucks.
Greg
2 个评论
Greg Heath
2019-1-16
编辑:Greg Heath
2019-1-16
I SEE NO REASON FOR IT'S EXISTENCE.!
My approach is as simple as possible. Typically, I accept all defaults except a double for loop over a non-overfitting number of Hidden nodes and 10 or (RARELY!) 20 sets of random initial weights for each value of H.
I have posted jillions of exmples in BOTH comp.soft-sys.matlab and ANSWERS.
HOPE THIS HELPS.
GREG
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Get Started with Statistics and Machine Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!