CrossValidation: Cross Validation is a technique which was used to evaluate the performance of particular model like regression or classification model. here we will use K fold cross validation which was mainly used for machine learning and Statistical models .
K-fold Cross Validation: In this we will split the data or divide it into K roughly equal-sized parts or “folds.” Typically, K is a number like 5 or 10, but it can vary based on the requirements.
And then we will train and evaluate the model on the data in the training set for that particular iteration. we use the model to make predictions on the data in the testing set as well. we will use the performance metric MSE(Mean squared error) that how well the model is performed on the testing set for that specific iteration.
Mean Squared Error(MSE):Mean Squared Error (MSE) is a commonly used performance metric in statistics and machine learning to measure the average squared difference between the values predicted by a model and the actual values in a dataset. It defines how well a predictive model is performing to get the desired outcome with an accuracy .