{"id":25530353,"date":"2022-06-26T15:00:58","date_gmt":"2022-06-26T09:30:58","guid":{"rendered":"https:\/\/entri.app\/blog\/?p=25530353"},"modified":"2022-11-23T11:31:46","modified_gmt":"2022-11-23T06:01:46","slug":"what-is-cross-validation-in-machine-learning","status":"publish","type":"post","link":"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/","title":{"rendered":"What is Cross-Validation in Machine Learning"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_79_2 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69d056eb225af\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69d056eb225af\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/#Validation\" >Validation<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/#Holdout_Method\" >Holdout Method<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/#K-Fold_Cross_Validation\" >K-Fold Cross Validation<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/#Stratified_K-Fold_Cross_Validation\" >Stratified K-Fold Cross Validation<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/#Leave-P-Out_Cross_Validation\" >Leave-P-Out Cross Validation<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/#Advantages_and_Disadvantages_of_Cross_Validation_in_Machine_Learning\" >Advantages and Disadvantages of Cross Validation in Machine Learning<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/#Advantages_of_Cross_Validation\" >Advantages of Cross Validation<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/#Disadvantages_of_Cross_Validation\" >Disadvantages of Cross Validation<\/a><\/li><\/ul><\/nav><\/div>\n<div class=\"\">\n<h1 id=\"a633\" class=\"pw-post-title jj jk jl bn jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc kd ke kf kg kh gc\" data-selectable-paragraph=\"\"><\/h1>\n<\/div>\n<p id=\"9e86\" class=\"pw-post-body-paragraph ki kj jl kk b kl km kn ko kp kq kr ks kt ku kv kw kx ky kz la lb lc ld le lf it gc\" data-selectable-paragraph=\"\">There is always a need to validate the stability of your machine learning model. I mean you just can\u2019t fit the model to your training data and hope it would accurately work for the real data it has never seen before.<\/p>\n<p data-selectable-paragraph=\"\"><a href=\"https:\/\/bit.ly\/3ELmCiA\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-25520910 size-full\" src=\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square.png\" alt=\"Python and Machine Learning Square\" width=\"345\" height=\"345\" srcset=\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square.png 345w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-300x300.png 300w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-150x150.png 150w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-24x24.png 24w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-48x48.png 48w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-96x96.png 96w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-75x75.png 75w\" sizes=\"auto, (max-width: 345px) 100vw, 345px\" \/><\/a><\/p>\n<h2 id=\"541f\" class=\"lh li jl bn lj lk ll lm ln lo lp lq lr kt ls lt lu kx lv lw lx lb ly lz ma mb gc\" data-selectable-paragraph=\"\"><span class=\"ez-toc-section\" id=\"Validation\"><\/span><strong>Validation<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p id=\"b03e\" class=\"pw-post-body-paragraph ki kj jl kk b kl mc kn ko kp md kr ks kt me kv kw kx mf kz la lb mg ld le lf it gc\" data-selectable-paragraph=\"\">The process of deciding whether the numerical results quantifying hypothesized relationships between variables, are acceptable as descriptions of the data, is known as validation. Generally, an error estimation for the model is made after training, better known as evaluation of residuals. In this process, a numerical estimate of the difference is predicted and original responses is done, also called the training error. However, this only gives us an idea about how well our model does on data used to train it. Now its possible that the model is underfitting or overfitting the data. So, the problem with this evaluation technique is that it does not give an indication of how well the learner will generalize to an independent\/ unseen data set. Getting this idea about our model is known as Cross Validation.<\/p>\n<h2 id=\"a67a\" class=\"lh li jl bn lj lk ll lm ln lo lp lq lr kt ls lt lu kx lv lw lx lb ly lz ma mb gc\" data-selectable-paragraph=\"\"><span class=\"ez-toc-section\" id=\"Holdout_Method\"><\/span><strong>Holdout Method<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p id=\"24f5\" class=\"pw-post-body-paragraph ki kj jl kk b kl mc kn ko kp md kr ks kt me kv kw kx mf kz la lb mg ld le lf it gc\" data-selectable-paragraph=\"\">Now a\u00a0basic remedy for this involves removing a part of the training data and using it to get predictions from the model trained on rest of the data.\u00a0The error estimation then tells how our model is doing on unseen data or the validation set.\u00a0This is a simple kind of cross validation technique, also known as the holdout method. Although this method doesn\u2019t take any overhead to compute and is better than traditional validation,\u00a0it still suffers from issues of high variance.\u00a0This is because it is not certain which data points will end up in the validation set and the result might be entirely different for different sets.<\/p>\n<h2 id=\"15c8\" class=\"lh li jl bn lj lk ll lm ln lo lp lq lr kt ls lt lu kx lv lw lx lb ly lz ma mb gc\" data-selectable-paragraph=\"\"><span class=\"ez-toc-section\" id=\"K-Fold_Cross_Validation\"><\/span><strong class=\"ba\">K-Fold Cross Validation<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p id=\"f57f\" class=\"pw-post-body-paragraph ki kj jl kk b kl mc kn ko kp md kr ks kt me kv kw kx mf kz la lb mg ld le lf it gc\" data-selectable-paragraph=\"\">As there is never enough data to train your model,\u00a0removing a part of it for validation poses a problem of underfitting.\u00a0By reducing the training data,\u00a0we risk losing important patterns\/ trends in data set, which in turn increases error induced by bias.\u00a0So, what we require is a method that provides ample data for training the model and also leaves ample data for validation. K Fold cross validation does exactly that.<\/p>\n<p id=\"253c\" class=\"pw-post-body-paragraph ki kj jl kk b kl km kn ko kp kq kr ks kt ku kv kw kx ky kz la lb lc ld le lf it gc\" data-selectable-paragraph=\"\">In\u00a0K Fold cross validation, the data is divided into k subsets. Now the holdout method is repeated k times, such that\u00a0each time, one of the k subsets is used as the test set\/ validation set and the other k-1 subsets are put together to form a training set. The\u00a0error estimation is averaged over all k trials to get total effectiveness of our model. As can be seen, every data point gets to be in a validation set exactly once, and gets to be in a training set\u00a0k-1\u00a0times.\u00a0This significantly reduces bias as we are using most of the data for fitting, and also significantly reduces variance as most of the data is also being used in validation set.\u00a0Interchanging the training and test sets also adds to the effectiveness of this method.\u00a0As a general rule and empirical evidence, K = 5 or 10 is generally preferred, but nothing\u2019s fixed and it can take any value.<\/p>\n<h4 style=\"text-align: center;\"><a href=\"https:\/\/bit.ly\/3ELmCiA\" target=\"_blank\" rel=\"noopener\">Learn Machine learning in advanced level. Join Entri now<\/a><\/h4>\n<h2 id=\"fb80\" class=\"lh li jl bn lj lk ll lm ln lo lp lq lr kt ls lt lu kx lv lw lx lb ly lz ma mb gc\" data-selectable-paragraph=\"\"><span class=\"ez-toc-section\" id=\"Stratified_K-Fold_Cross_Validation\"><\/span><strong>Stratified K-Fold Cross Validation<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p id=\"6da0\" class=\"pw-post-body-paragraph ki kj jl kk b kl mc kn ko kp md kr ks kt me kv kw kx mf kz la lb mg ld le lf it gc\" data-selectable-paragraph=\"\">In some cases, there may be a large imbalance in the response variables. For example, in dataset concerning price of houses, there might be large number of houses having high price. Or in case of classification, there might be several times more negative samples than positive samples. For such problems,\u00a0a slight variation in the K Fold cross validation technique is made, such that each fold contains approximately the same percentage of samples of each target class as the complete set, or in case of prediction problems, the mean response value is approximately equal in all the folds.\u00a0This variation is also known as\u00a0Stratified K Fold.<\/p>\n<blockquote class=\"mi mj mk\">\n<p id=\"abbd\" class=\"ki kj lg kk b kl km kn ko kp kq kr ks ml ku kv kw mm ky kz la mn lc ld le lf it gc\" data-selectable-paragraph=\"\">Above explained validation techniques are also referred to as Non-exhaustive cross validation methods. These do not compute all ways of splitting the original sample, i.e. you just have to decide how many subsets need to be made. Also, these are approximations of method explained below, also called Exhaustive Methods, that computes all possible ways the data can be split into training and test sets.<\/p>\n<\/blockquote>\n<h2 id=\"7fc3\" class=\"lh li jl bn lj lk ll lm ln lo lp lq lr kt ls lt lu kx lv lw lx lb ly lz ma mb gc\" data-selectable-paragraph=\"\"><span class=\"ez-toc-section\" id=\"Leave-P-Out_Cross_Validation\"><\/span><strong>Leave-P-Out Cross Validation<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p id=\"2d46\" class=\"pw-post-body-paragraph ki kj jl kk b kl mc kn ko kp md kr ks kt me kv kw kx mf kz la lb mg ld le lf it gc\" data-selectable-paragraph=\"\">This approach leaves p data points out of training data, i.e. if there are n data points in the original sample then, n-p samples are used to train the model and p points are used as the validation set. This is repeated for all combinations in which original sample can be separated this way, and then the error is averaged for all trials, to give overall effectiveness.<\/p>\n<p id=\"c4ec\" class=\"pw-post-body-paragraph ki kj jl kk b kl km kn ko kp kq kr ks kt ku kv kw kx ky kz la lb lc ld le lf it gc\" data-selectable-paragraph=\"\">This method is exhaustive in the sense that it needs to train and validate the model for all possible combinations, and for moderately large p, it can become computationally infeasible.<\/p>\n<p id=\"7282\" class=\"pw-post-body-paragraph ki kj jl kk b kl km kn ko kp kq kr ks kt ku kv kw kx ky kz la lb lc ld le lf it gc\" data-selectable-paragraph=\"\">A particular case of this method is when p = 1. This is known as Leave one out cross validation.\u00a0This method is generally preferred over the previous one because\u00a0it does not suffer from the intensive computation, as number of possible combinations is equal to number of data points in original sample or n.<\/p>\n<p id=\"698f\" class=\"pw-post-body-paragraph ki kj jl kk b kl km kn ko kp kq kr ks kt ku kv kw kx ky kz la lb lc ld le lf it gc\" data-selectable-paragraph=\"\">Cross Validation is\u00a0a very useful technique for assessing the effectiveness of your model, particularly in cases where you need to mitigate overfitting.\u00a0It is\u00a0also of use in determining the hyper parameters of your model, in the sense that which parameters will result in lowest test error. This is all the basic you need to get started with cross validation. You can get started with all kinds of validation techniques using\u00a0Scikit-Learn, that gets you up and running with just a few lines of code in python.<\/p>\n<h2 class=\"post-title entry-title\"><span class=\"ez-toc-section\" id=\"Advantages_and_Disadvantages_of_Cross_Validation_in_Machine_Learning\"><\/span><strong>Advantages and Disadvantages of Cross Validation in Machine Learning<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<div class=\"post-header\">\n<div class=\"post-header-line-1\"><\/div>\n<\/div>\n<div id=\"post-body-2302735741005290048\" class=\"post-body entry-content\">\n<div dir=\"ltr\">\n<p>Cross Validation in Machine Learning is a great technique to deal with overfitting problem in various algorithms. Instead of training our model on one training dataset, we train our model on many datasets. Below are some of the advantages and disadvantages of Cross Validation in Machine Learning:<\/p>\n<p><a href=\"https:\/\/bit.ly\/3ELmCiA\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-25520910 size-full\" src=\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square.png\" alt=\"Python and Machine Learning Square\" width=\"345\" height=\"345\" srcset=\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square.png 345w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-300x300.png 300w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-150x150.png 150w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-24x24.png 24w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-48x48.png 48w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-96x96.png 96w, https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/04\/Python-and-Machine-Learning-Square-75x75.png 75w\" sizes=\"auto, (max-width: 345px) 100vw, 345px\" \/><\/a><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Advantages_of_Cross_Validation\"><\/span><b>Advantages of Cross Validation<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><b>1. Reduces Overfitting:<\/b>\u00a0In Cross Validation, we split the dataset into multiple folds and train the algorithm on different folds. This prevents our model from overfitting the training dataset. So, in this way, the model attains the generalization capabilities\u00a0which is a good sign of a robust algorithm.<\/p>\n<p><b>Note:\u00a0<\/b>Chances of overfitting are less if the dataset is large. So, Cross Validation may not be required at all in the situation where we have sufficient data available.<\/p>\n<p><b>2. Hyperparameter Tuning:<\/b>\u00a0Cross Validation helps in finding the optimal value of hyperparameters to increase the efficiency of the algorithm.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Disadvantages_of_Cross_Validation\"><\/span><b>Disadvantages of Cross Validation<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><b>1. Increases Training Time:<\/b>\u00a0Cross Validation drastically increases the training time. Earlier you had to train your model only on one training set, but with Cross Validation you have to train your model on multiple training sets.<\/p>\n<p>For example, if you go with 5 Fold Cross Validation, you need to do 5 rounds of training each on different 4\/5 of available data. And this is for only one choice of hyperparameters. If you have multiple choice of parameters, then the training period will shoot too high.<\/p>\n<p><b>2. Needs Expensive Computation:<\/b>\u00a0Cross Validation is computationally very expensive in terms of processing power required.<\/p>\n<h4 style=\"text-align: center;\"><a href=\"https:\/\/bit.ly\/3ELmCiA\" target=\"_blank\" rel=\"noopener\">Learn Machine learning in advanced level. Join Entri now<\/a><\/h4>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>There is always a need to validate the stability of your machine learning model. I mean you just can\u2019t fit the model to your training data and hope it would accurately work for the real data it has never seen before. Validation The process of deciding whether the numerical results quantifying hypothesized relationships between variables, [&hellip;]<\/p>\n","protected":false},"author":111,"featured_media":25530394,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[802,1864],"tags":[],"class_list":["post-25530353","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-articles","category-data-science-ml"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What is Cross-Validation in Machine Learning - Entri Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is Cross-Validation in Machine Learning - Entri Blog\" \/>\n<meta property=\"og:description\" content=\"There is always a need to validate the stability of your machine learning model. I mean you just can\u2019t fit the model to your training data and hope it would accurately work for the real data it has never seen before. Validation The process of deciding whether the numerical results quantifying hypothesized relationships between variables, [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/\" \/>\n<meta property=\"og:site_name\" content=\"Entri Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/entri.me\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-06-26T09:30:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-23T06:01:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/06\/What-is-Cross-Validation-in-Machine-Learnin-2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"820\" \/>\n\t<meta property=\"og:image:height\" content=\"615\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Feeba Mahin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@entri_app\" \/>\n<meta name=\"twitter:site\" content=\"@entri_app\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Feeba Mahin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/\"},\"author\":{\"name\":\"Feeba Mahin\",\"@id\":\"https:\/\/entri.app\/blog\/#\/schema\/person\/f036dab84abae3dcc9390a1110d95d36\"},\"headline\":\"What is Cross-Validation in Machine Learning\",\"datePublished\":\"2022-06-26T09:30:58+00:00\",\"dateModified\":\"2022-11-23T06:01:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/\"},\"wordCount\":1222,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/entri.app\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/06\/What-is-Cross-Validation-in-Machine-Learnin-2.png\",\"articleSection\":[\"Articles\",\"Data Science and Machine Learning\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/\",\"url\":\"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/\",\"name\":\"What is Cross-Validation in Machine Learning - Entri Blog\",\"isPartOf\":{\"@id\":\"https:\/\/entri.app\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/06\/What-is-Cross-Validation-in-Machine-Learnin-2.png\",\"datePublished\":\"2022-06-26T09:30:58+00:00\",\"dateModified\":\"2022-11-23T06:01:46+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/#primaryimage\",\"url\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/06\/What-is-Cross-Validation-in-Machine-Learnin-2.png\",\"contentUrl\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/06\/What-is-Cross-Validation-in-Machine-Learnin-2.png\",\"width\":820,\"height\":615,\"caption\":\"What is Cross-Validation in Machine Learning\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/entri.app\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Entri Skilling\",\"item\":\"https:\/\/entri.app\/blog\/category\/entri-skilling\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Data Science and Machine Learning\",\"item\":\"https:\/\/entri.app\/blog\/category\/entri-skilling\/data-science-ml\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"What is Cross-Validation in Machine Learning\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/entri.app\/blog\/#website\",\"url\":\"https:\/\/entri.app\/blog\/\",\"name\":\"Entri Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/entri.app\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/entri.app\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/entri.app\/blog\/#organization\",\"name\":\"Entri App\",\"url\":\"https:\/\/entri.app\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/entri.app\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2019\/10\/Entri-Logo-1.png\",\"contentUrl\":\"https:\/\/entri.app\/blog\/wp-content\/uploads\/2019\/10\/Entri-Logo-1.png\",\"width\":989,\"height\":446,\"caption\":\"Entri App\"},\"image\":{\"@id\":\"https:\/\/entri.app\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/entri.me\/\",\"https:\/\/x.com\/entri_app\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/entri.app\/blog\/#\/schema\/person\/f036dab84abae3dcc9390a1110d95d36\",\"name\":\"Feeba Mahin\",\"url\":\"https:\/\/entri.app\/blog\/author\/feeba123\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is Cross-Validation in Machine Learning - Entri Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/","og_locale":"en_US","og_type":"article","og_title":"What is Cross-Validation in Machine Learning - Entri Blog","og_description":"There is always a need to validate the stability of your machine learning model. I mean you just can\u2019t fit the model to your training data and hope it would accurately work for the real data it has never seen before. Validation The process of deciding whether the numerical results quantifying hypothesized relationships between variables, [&hellip;]","og_url":"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/","og_site_name":"Entri Blog","article_publisher":"https:\/\/www.facebook.com\/entri.me\/","article_published_time":"2022-06-26T09:30:58+00:00","article_modified_time":"2022-11-23T06:01:46+00:00","og_image":[{"width":820,"height":615,"url":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/06\/What-is-Cross-Validation-in-Machine-Learnin-2.png","type":"image\/png"}],"author":"Feeba Mahin","twitter_card":"summary_large_image","twitter_creator":"@entri_app","twitter_site":"@entri_app","twitter_misc":{"Written by":"Feeba Mahin","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/#article","isPartOf":{"@id":"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/"},"author":{"name":"Feeba Mahin","@id":"https:\/\/entri.app\/blog\/#\/schema\/person\/f036dab84abae3dcc9390a1110d95d36"},"headline":"What is Cross-Validation in Machine Learning","datePublished":"2022-06-26T09:30:58+00:00","dateModified":"2022-11-23T06:01:46+00:00","mainEntityOfPage":{"@id":"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/"},"wordCount":1222,"commentCount":0,"publisher":{"@id":"https:\/\/entri.app\/blog\/#organization"},"image":{"@id":"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/#primaryimage"},"thumbnailUrl":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/06\/What-is-Cross-Validation-in-Machine-Learnin-2.png","articleSection":["Articles","Data Science and Machine Learning"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/","url":"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/","name":"What is Cross-Validation in Machine Learning - Entri Blog","isPartOf":{"@id":"https:\/\/entri.app\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/#primaryimage"},"image":{"@id":"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/#primaryimage"},"thumbnailUrl":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/06\/What-is-Cross-Validation-in-Machine-Learnin-2.png","datePublished":"2022-06-26T09:30:58+00:00","dateModified":"2022-11-23T06:01:46+00:00","breadcrumb":{"@id":"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/#primaryimage","url":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/06\/What-is-Cross-Validation-in-Machine-Learnin-2.png","contentUrl":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2022\/06\/What-is-Cross-Validation-in-Machine-Learnin-2.png","width":820,"height":615,"caption":"What is Cross-Validation in Machine Learning"},{"@type":"BreadcrumbList","@id":"https:\/\/entri.app\/blog\/what-is-cross-validation-in-machine-learning\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/entri.app\/blog\/"},{"@type":"ListItem","position":2,"name":"Entri Skilling","item":"https:\/\/entri.app\/blog\/category\/entri-skilling\/"},{"@type":"ListItem","position":3,"name":"Data Science and Machine Learning","item":"https:\/\/entri.app\/blog\/category\/entri-skilling\/data-science-ml\/"},{"@type":"ListItem","position":4,"name":"What is Cross-Validation in Machine Learning"}]},{"@type":"WebSite","@id":"https:\/\/entri.app\/blog\/#website","url":"https:\/\/entri.app\/blog\/","name":"Entri Blog","description":"","publisher":{"@id":"https:\/\/entri.app\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/entri.app\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/entri.app\/blog\/#organization","name":"Entri App","url":"https:\/\/entri.app\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/entri.app\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2019\/10\/Entri-Logo-1.png","contentUrl":"https:\/\/entri.app\/blog\/wp-content\/uploads\/2019\/10\/Entri-Logo-1.png","width":989,"height":446,"caption":"Entri App"},"image":{"@id":"https:\/\/entri.app\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/entri.me\/","https:\/\/x.com\/entri_app"]},{"@type":"Person","@id":"https:\/\/entri.app\/blog\/#\/schema\/person\/f036dab84abae3dcc9390a1110d95d36","name":"Feeba Mahin","url":"https:\/\/entri.app\/blog\/author\/feeba123\/"}]}},"_links":{"self":[{"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/posts\/25530353","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/users\/111"}],"replies":[{"embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/comments?post=25530353"}],"version-history":[{"count":7,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/posts\/25530353\/revisions"}],"predecessor-version":[{"id":25547877,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/posts\/25530353\/revisions\/25547877"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/media\/25530394"}],"wp:attachment":[{"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/media?parent=25530353"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/categories?post=25530353"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/entri.app\/blog\/wp-json\/wp\/v2\/tags?post=25530353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}