DEV Community

Ankita Sahoo
Ankita Sahoo

Posted on • Updated on

Day-20 of Machine Learning

Day-20 of Machine Learning:

  • Learnt about cross-validation:

Cross-validation is a technique for evaluating a machine learning model and testing its performance.
Cross validation refers to an extra data set that used to cross check the validity or the accuracy of the model.
for example, let a ML model trained over the training-set and the accuracy is 98%. Wow!!! But still we can't say that the model has trained very well, and it is because it is performing well over the data that it already knows and if we expose the model to completely new, unseen data, it might not predict with the same accuracy and it might fail to generalize over the new data. it is the case of overfitting or High variance. Similarly, if the model does not perform well on training-set as well as cross-validation set, then it is Underfitting / High bias.

Image description

Using Training-set we fit the parameters [W,b] then choose parameter d (degree of polynomial) using cross-validation set. So, we have not used test-set till now to fit either of any parameters, that is why Jtest will be a fire estimate of the generalization error of the model

Top comments (0)