- Machine Learning in Java
- AshishSingh Bhatia Bostjan Kaluza
- 327字
- 2021-06-10 19:30:05
Underfitting and overfitting
Predictor training can lead to models that are too complex or too simple. The model with low complexity (the leftmost models in the following diagram) can be as simple as predicting the most frequent or mean class value, while the model with high complexity (the rightmost models) can represent the training instances. Modes that are too rigid, shown on the left-hand side, cannot capture complex patterns; while models that are too flexible, shown on the right-hand side, fit to the noise in the training data. The main challenge is to select the appropriate learning algorithm and its parameters, so that the learned model will perform well on the new data (for example, the middle column):
The following diagram shows how errors in the training set decreases with model complexity. Simple rigid models underfit the data and have large errors. As model complexity increases, it describes the underlying structure of the training data better and, consequentially, the error decreases. If the model is too complex, it overfits the training data and its prediction error increases again:
Depending on the task complexity and data availability, we want to tune our classifiers toward more or less complex structures. Most learning algorithms allow such tuning, as follows:
- Regression: This is the order of the polynomial
- Naive Bayes: This is the number of the attributes
- Decision trees: This is the number of nodes in the tree—pruning confidence
- K-nearest neighbors: This is the number of neighbors—distance-based neighbor weights
- SVM: This is the kernel type; cost parameter
- Neural network: This is the number of neurons and hidden layers
With tuning, we want to minimize the generalization error; that is, how well the classifier performs on future data. Unfortunately, we can never compute the true generalization error; however, we can estimate it. Nevertheless, if the model performs well on the training data but performance is much worse on the test data, then the model most likely overfits.
- 現(xiàn)代測(cè)控系統(tǒng)典型應(yīng)用實(shí)例
- Oracle SOA Governance 11g Implementation
- TIBCO Spotfire:A Comprehensive Primer(Second Edition)
- 傳感器技術(shù)應(yīng)用
- 運(yùn)動(dòng)控制系統(tǒng)
- Apache源代碼全景分析(第1卷):體系結(jié)構(gòu)與核心模塊
- 運(yùn)動(dòng)控制系統(tǒng)
- 天才與算法:人腦與AI的數(shù)學(xué)思維
- 網(wǎng)絡(luò)安全原理與應(yīng)用
- R Statistics Cookbook
- fastText Quick Start Guide
- 博弈論與無線傳感器網(wǎng)絡(luò)安全
- Learning VMware App Volumes
- 網(wǎng)絡(luò)互聯(lián)組網(wǎng)配置技術(shù)
- Ripple Quick Start Guide