欠拟合与过拟合的概念
Almost every person practicing machine learning has come across overfitting and underfitting,many of us where stuck behind,trying figure out a way to have a good fit or good machine learning model.if you are part of them then congrat because I will surely impact you with short,pricise and straight to the point concept of understanding underfitting, overfitting and good fit.
几乎每个从事机器学习的人都遇到过拟合和过拟合的问题,我们中的许多人都被束之高阁,试图找到一种合适或合适的机器学习模型的方法。如果您是其中的一部分,那么恭喜,因为我一定会对您产生影响简短,准确,直截了当的概念是了解不合身,过合和合身。
什么是不合身的? (What is underfitting ?)
From the word under,it clearly manifest something lesser or not up to standard, requirement, expectection or enough.
从下面这个词,它清楚地表明一些不符合标准,要求,期望或足够的东西。
When the machine learning model perform poorly on the test data is called -underfitting
当机器学习模型在测试数据上表现不佳时,称为-欠拟合
- Underfitting is when the model exhibit a low variance and high bias 拟合不足是指模型显示出低方差和高偏差
- Underfitting may be caused as result of smaller dataset and lesser neural network 数据集较小和神经网络较少可能导致拟合不足
- When the model perform poorly on both the testing and training dataset,it is called underfitting 当模型在测试和训练数据集上均表现不佳时,称为欠拟合
![Image for post](https://miro.medium.com/max/9999/1*ByOKcg063BGLxAHtnOoYTw.png)
In underfitting,the machine learning model does not have enough variable and parameters to solve and a more advanced model will perform better
在欠拟合中,机器学习模型没有足够的变量和参数来解决,而更高级的模型将表现更好
避免不合适的解决方案? (Solutions to avoid underfitting?)
- A rebust and more advance model with more parameters and variables 具有更多参数和变量的重制和更高级模型
- Much larger datasets and neural network(note:too much neural network may result to overfitting) 更大的数据集和神经网络(注:过多的神经网络可能导致过度拟合)
- Increasing the complexity of the model 增加模型的复杂性
- Increase the number of training duration or epochs 增加训练持续时间或次数
什么是过度拟合? (What is overfitting ?)
When loss initially decrease on both the training and validation data But after some time the training loss will continue to decrease while the validation loss will begin to increase,when this happens the model is Overfit.
当训练和验证数据上的损失都开始减少时,但是经过一段时间后,当模型发生过拟合时,训练损失将继续减少而验证损失将开始增加。
In overfitting the model memorize the answers on the training data and does not generalize to the test data
在过度拟合模型中,记住训练数据的答案,而不能推广到测试数据
![Image for post](https://miro.medium.com/max/9999/1*vqaLuzNAW9PI9igUMu-wlQ.png)
- Overfitting happens when the machine learning model performs very well on the training data but poorly on the test data 当机器学习模型在训练数据上表现很好但在测试数据上表现不佳时,就会发生过度拟合
- In overfitting,the model exhibit high variance and low bias 在过度拟合中,模型表现出高方差和低偏差
In Overfitting,the model becomes too specialized on solving for the training data and starts to perform worse when validated on the test data.
在“过度拟合”中,该模型过于专注于求解训练数据,并且在对测试数据进行验证时开始表现较差。
避免过度拟合的解决方案? (Solutions to avoid overfitting?)
- Regularization techniques such as L1 and L2 regularization also called lasso and ridge regularization which are commonly used. 诸如L1和L2正则化之类的正则化技术也称为套索和脊正则化。
- Set target or Early stopping rate for the training model. 为训练模型设置目标或提前停止率。
- Reducing the neural networks. 减少神经网络。
了解适合度 (Understanding good fit)
Good fit is the target and the result everyone is expected on his/her machine learning model.
良好的适应性是目标,每个人都可以在其机器学习模型上获得预期的结果。
The learning curve are widely and generally used as display, analysis and diagnosis tool in machine learning to evaluate the training and validation data and shows thier performance
学习曲线广泛地用作机器学习的显示,分析和诊断工具,以评估训练和验证数据并显示其性能
![Image for post](https://miro.medium.com/max/9999/1*ql5llElL5HLwJgh_lMHZgQ.jpeg)
The learning curve shows if the machine learning model is underfit, Overfit or good fit
学习曲线显示机器学习模型是欠拟合,过拟合还是良好拟合
结论 (Conclusion)
From this precise write-up you understand that a machine learning model that is underfit will have high training and testing error while an Overfit model will have low training error but high testing error,and part of the recommended techniques of reducing overfitting are: to reduce the complexity of the model, regularizatio (Lasso and rigde) and also for underfitting: increase the number of parameters, dataset and complexity of the model will prove efficiently in tackling it
通过这种精确的撰写,您了解到,欠拟合的机器学习模型将具有较高的训练和测试误差,而过拟合的模型将具有较低的训练误差但具有较高的测试误差,并且建议的减少过度拟合的技术的一部分包括:模型的复杂性,正则化(套索和绑定)以及欠拟合:增加参数的数量,数据集和模型的复杂性将有效地解决该问题
欠拟合与过拟合的概念