{"id":927,"date":"2018-11-13T16:16:46","date_gmt":"2018-11-13T16:16:46","guid":{"rendered":"http:\/\/muthu.co\/?p=927"},"modified":"2021-01-02T14:05:02","modified_gmt":"2021-01-02T14:05:02","slug":"k-fold-cross-validation","status":"publish","type":"post","link":"http:\/\/write.muthu.co\/k-fold-cross-validation\/","title":{"rendered":"K-fold cross validation"},"content":{"rendered":"

The greatest headache for any machine learning engineer is the problem of overfitting. The model we trained works perfectly on the training dataset but when applied to other new dataset it fails miserably. This is because of overfitting where our classifier learns the provided dataset accurately but fails when applied on new data.<\/p>\n

One good solution to this problem is to train the modal using the K-fold cross validation technique which is done this way:<\/p>\n

    \n
  1. Divide the dataset randomly into k partitions.<\/li>\n
  2. Train the classifier using k-1 partitions, keep one partition aside for testing the classifier.<\/li>\n
  3. Keep repeating this process until you have k different trained classifiers and k performance metrics for them<\/li>\n
  4. Take the average of all the metrics, this is the best estimate of the performance of your classifier.<\/li>\n<\/ol>\n

      <\/p>\n","protected":false},"excerpt":{"rendered":"

    The greatest headache for any machine learning engineer is the problem of overfitting. The model we trained works perfectly on the training dataset but when applied to other new dataset it fails miserably. This is because of overfitting where our classifier learns the provided dataset accurately but fails when applied on new data. One good […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37],"tags":[49],"_links":{"self":[{"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/posts\/927"}],"collection":[{"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/comments?post=927"}],"version-history":[{"count":1,"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/posts\/927\/revisions"}],"predecessor-version":[{"id":1586,"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/posts\/927\/revisions\/1586"}],"wp:attachment":[{"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/media?parent=927"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/categories?post=927"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/tags?post=927"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}