K-fold validation
In today’s lecture discussion was on Cross validation.
Before diving into the topic of cross validation I successfully explored when does the cross validation technique is used.
So the cross validation technique is used when the train test validation goes biasing, then the cross validation is used to avoid that biasing as the testing is performed on overall dataset for the performance estimate check.
There are 4 types of cross validation techniques:
- K-folds
- Stratified K-folds
- Leave-one-out
- Leave-p-out
In this we use the K-fold cross validation for our dataset. As the cross validation is a predictive analytics involve estimating model in more data samples and evaluating how good the model performs in separate data sample from same population.
The K-fold cross validation is a type of predictive analytics. The original data split randomly into k subsamples i.e. the training data.
Models estimated k-1 subsamples for each fold, kth subsample serving as validation sample. The process is iterated until every sample served as validation data and results is averaged.
Splitting original data into subset, passes through k-fold cross validation pipeline as above. It’s evaluating the final model performance ,the final data subset is the Test data.
The Linear regression & logistic regression models can be applied in the k-fold cross validation. Here we are using the linear regression model in the k-fold cross validation.