<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/ml-fundamentals-day-12-30-what-is-overfitting-and-how-to-spot-it--idrjkt1hj" -->

---
title: ML Fundamentals Day 12/30: What Is Overfitting? (And How...
description: A beginner-friendly introduction to overfitting in machine learning, using an analogy of a student memorizing a textbook instead of understanding concepts....
canonical: https://daily.dev/posts/ml-fundamentals-day-12-30-what-is-overfitting-and-how-to-spot-it--idrjkt1hj
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: ML Fundamentals Day 12/30: What Is Overfitting? (And How to Spot It) | daily.dev
og:description: A beginner-friendly introduction to overfitting in machine learning, using an analogy of a student memorizing a textbook instead of understanding concepts....
og:url: https://daily.dev/posts/ml-fundamentals-day-12-30-what-is-overfitting-and-how-to-spot-it--idrjkt1hj
og:image: https://api.daily.dev/og/posts/IDrJKT1hj.png
og:image:alt: ML Fundamentals Day 12/30: What Is Overfitting? (And How to Spot It)
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# ML Fundamentals Day 12/30: What Is Overfitting? (And How to Spot It)

**[Medium](https://daily.dev/sources/medium_js)** · 5 min read · 1 upvotes · 0 comments

## Summary

A beginner-friendly introduction to overfitting in machine learning, using an analogy of a student memorizing a textbook instead of understanding concepts. Explains how overfitting occurs when a model learns training data too well — including noise — and fails to generalize to new data. Demonstrates the concept with Python code using scikit-learn's polynomial regression, showing how a high-degree polynomial (degree 15) overfits compared to a simple linear model (degree 1), and how to detect overfitting by comparing training vs. test error using mean squared error.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/@codewithnikki/ml-fundamentals-day-12-30-what-is-overfitting-and-how-to-spot-it-8d9cb0e19467>

## Questions this post answers

### What is overfitting in machine learning and how do I detect it?

Overfitting occurs when a model learns the training data too well, memorizing specific details and noise rather than general patterns, causing it to perform poorly on new, unseen data. It is detected by comparing training accuracy to test accuracy: a large gap, such as 99% training accuracy versus 60% test accuracy, signals overfitting.

_Track practical ML fundamentals like model evaluation and generalization through daily.dev's developer feed._

### How does polynomial degree affect overfitting in regression models?

Increasing the degree of a polynomial regression model increases its flexibility to bend and curve, which can cause it to fit noise in the training data rather than the true underlying pattern. A degree-15 polynomial fit to noisy sine-wave data will show very low training error but much higher test error compared to a simple degree-1 linear model, illustrating overfitting.

_Developers comparing model complexity trade-offs can follow more ML fundamentals content on daily.dev._

## Similar posts on daily.dev

- [Overfitting vs. Underfitting: Making Sense of the Bias-Variance Trade-Off](https://daily.dev/posts/overfitting-vs-underfitting-making-sense-of-the-bias-variance-trade-off-9yuxkvcor) · Towards Data Science · 0 upvotes · 0 comments
- [Machine Learning Models: Validation, Underfitting, Overfitting, and Random Forest Explained Simply](https://daily.dev/posts/machine-learning-models-validation-underfitting-overfitting-and-random-forest-explained-simply-72oryc0io) · Medium · 0 upvotes · 0 comments
- [The Day the Machine Met a Stranger](https://daily.dev/posts/the-day-the-machine-met-a-stranger-8s4d0qmnn) · Medium · 0 upvotes · 0 comments
- [A Visual Introduction to Machine Learning](https://daily.dev/posts/a-visual-introduction-to-machine-learning-dnkoizyrs) · Hacker News · 0 upvotes · 0 comments

---

Tags: [#machine-learning](https://daily.dev/tags/machine-learning), [#python](https://daily.dev/tags/python), [#scikit](https://daily.dev/tags/scikit), [#overfitting](https://daily.dev/tags/overfitting)

[View this post on daily.dev](https://daily.dev/posts/ml-fundamentals-day-12-30-what-is-overfitting-and-how-to-spot-it--idrjkt1hj)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"ML Fundamentals Day 12/30: What Is Overfitting? (And How to Spot It)","url":"https://daily.dev/posts/ml-fundamentals-day-12-30-what-is-overfitting-and-how-to-spot-it--idrjkt1hj","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/ml-fundamentals-day-12-30-what-is-overfitting-and-how-to-spot-it--idrjkt1hj"},"datePublished":"2026-07-24T00:12:49.925Z","dateModified":"2026-09-13T20:05:22.416Z","description":"A beginner-friendly introduction to overfitting in machine learning, using an analogy of a student memorizing a textbook instead of understanding concepts....","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d6ab0a9a223ee01bc82d647f54feb2d2?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d6ab0a9a223ee01bc82d647f54feb2d2?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/ml-fundamentals-day-12-30-what-is-overfitting-and-how-to-spot-it--idrjkt1hj","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"machine-learning,python,scikit,overfitting","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"ML Fundamentals Day 12/30: What Is Overfitting? (And How to Spot It)"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/ml-fundamentals-day-12-30-what-is-overfitting-and-how-to-spot-it--idrjkt1hj#faq","mainEntity":[{"@type":"Question","name":"What is overfitting in machine learning and how do I detect it?","acceptedAnswer":{"@type":"Answer","text":"Overfitting occurs when a model learns the training data too well, memorizing specific details and noise rather than general patterns, causing it to perform poorly on new, unseen data. It is detected by comparing training accuracy to test accuracy: a large gap, such as 99% training accuracy versus 60% test accuracy, signals overfitting. Track practical ML fundamentals like model evaluation and generalization through daily.dev's developer feed."}},{"@type":"Question","name":"How does polynomial degree affect overfitting in regression models?","acceptedAnswer":{"@type":"Answer","text":"Increasing the degree of a polynomial regression model increases its flexibility to bend and curve, which can cause it to fit noise in the training data rather than the true underlying pattern. A degree-15 polynomial fit to noisy sine-wave data will show very low training error but much higher test error compared to a simple degree-1 linear model, illustrating overfitting. Developers comparing model complexity trade-offs can follow more ML fundamentals content on daily.dev."}}]}
```

