- Building Machine Learning Systems with Python
- Luis Pedro Coelho Willi Richert Matthieu Brucher
- 250字
- 2021-07-23 17:11:19
Training and testing
If we only had some data from the future that we could use to measure our models against, then we should be able to judge our model choice only on the resulting approximation error.
Although we cannot look into the future, we can and should simulate a similar effect by holding out a part of our data. Let's remove, for instance, a certain percentage of the data and train on the remaining one. Then, we use the held-out data to calculate the error. As the model has been trained without knowing the held-out data, we should get a more realistic picture of how the model will behave in the future.
The test errors for the models trained only on the time after the inflection point now show a completely different picture:
- d=1: 6492812.705336
- d=2: 5008335.504620
- d=3: 5006519.831510
- d=10: 5440767.696731
- d=53: 5369417.148129
Have a look at the following plot:

It seems the model with the degrees 2 and 3 has the lowest test error, which is the error that is shown when measured using data that the model did not see during training. This gives us hope that we won't get bad surprises when future data arrives. However, we are not fully done yet.
We will see in the next plot why we cannot simply pick the model with the lowest error:

The model with degree 3 does not foresee a future in which we will ever get 100,000 hits per hour. So we stick with degree 2.
- Deep Learning with PyTorch
- 計(jì)算機(jī)應(yīng)用與維護(hù)基礎(chǔ)教程
- micro:bit魔法修煉之Mpython初體驗(yàn)
- scikit-learn:Machine Learning Simplified
- 固態(tài)存儲:原理、架構(gòu)與數(shù)據(jù)安全
- 單片微機(jī)原理及應(yīng)用
- 基于網(wǎng)絡(luò)化教學(xué)的項(xiàng)目化單片機(jī)應(yīng)用技術(shù)
- IP網(wǎng)絡(luò)視頻傳輸:技術(shù)、標(biāo)準(zhǔn)和應(yīng)用
- Istio實(shí)戰(zhàn)指南
- 微服務(wù)實(shí)戰(zhàn)
- UML精粹:標(biāo)準(zhǔn)對象建模語言簡明指南(第3版)
- Raspberry Pi Home Automation with Arduino
- The Reinforcement Learning Workshop
- 基于S5PV210處理器的嵌入式開發(fā)完全攻略
- 零基礎(chǔ)輕松學(xué)修電腦主板