Menu
CoddyTech
NewJourney

Learn Machine Learning with Python

A free, hands-on machine learning course. Write real scikit-learn code, train models on real datasets and watch your charts appear in the Plots tab, one small step at a time.

1,000+ codders enrolled

233 lessons231 challenges965 quiz questions

  • Beginner friendly
  • sparkles iconAI-assisted coding help
  • hint iconHands-on interactive lessons
  • volume On iconAudio narration on every lesson
  • quiz iconQuizzes to test your knowledge
  • certificate iconFree certificate of completion

Train a model in your browser

Real scikit-learn code with its real output. Drag the slider to change one line and see what the model learns.

Small k memorizes every training point and draws a jagged border. Larger k smooths it out.

k =5
main.py
import numpy as np
import matplotlib.pyplot as plt
from sklearn.datasets import make_moons
from sklearn.model_selection import train_test_split
from sklearn.neighbors import KNeighborsClassifier


X, y = make_moons(n_samples=200, noise=0.3, random_state=0)
X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=0)


k = 5
model = KNeighborsClassifier(n_neighbors=k)
model.fit(X_train, y_train)
print(f"train accuracy: {model.score(X_train, y_train):.2f}")
print(f"test accuracy:  {model.score(X_test, y_test):.2f}")


xx, yy = np.meshgrid(np.linspace(-2, 3, 56), np.linspace(-1.5, 2, 40))
proba = model.predict_proba(np.c_[xx.ravel(), yy.ravel()])[:, 1]
proba = proba.reshape(xx.shape)


plt.figure(figsize=(5, 4))
plt.pcolormesh(xx, yy, proba, cmap="coolwarm", alpha=0.35)
plt.scatter(X_train[:, 0], X_train[:, 1], c=y_train,
            cmap="coolwarm", edgecolors="k")
plt.title(f"k-nearest neighbors, k = {k}")
plt.show()
Loading the charts
Output
 

Syllabus

4 sections233 lessons231 challenges965 quiz questions
  1. Start sectionStartExpandCollapseThe toolkit every machine learning project starts with: NumPy arrays, matplotlib charts and pandas tables. Load real datasets, summarize them and plot what you find.

    Introduction

    4 lessons320

    NumPy Arrays

    5 lessons520

    Array Math

    6 lessons625

    Shaping Data

    4 lessons415

    Line and Scatter Plots

    6 lessons625

    Charts for Data

    5 lessons520

    pandas DataFrames

    6 lessons625

    Filtering and Sorting

    5 lessons520

    Grouping and Cleaning

    5 lessons520

    Plotting DataFrames

    5 lessons520

    Datasets for ML

    5 lessons520

    Final Challenges

    4 lessons420
  2. Start sectionStartExpandCollapseThe statistics behind every model: center and spread, distributions, probability by simulation, samples, outliers, correlation, trend lines and group tests, then scaling and encoding features. Every idea is computed on real data and plotted.

    Center and Spread

    6 lessons625

    Distributions

    6 lessons625

    Probability by Simulation

    6 lessons625

    Samples and Populations

    5 lessons520

    Outliers

    5 lessons520

    Relationships

    6 lessons525

    Trend Lines

    6 lessons625

    Comparing Groups

    6 lessons625

    Feature Scaling

    5 lessons520

    Encoding Categories

    4 lessons415

    Exploring a Dataset

    5 lessons520

    Final Challenges

    4 lessons420
  3. Start sectionStartExpandCollapseTrain real models with scikit-learn: split, fit, predict and measure. k-NN, linear and logistic regression, trees, forests and boosting, honest evaluation with cross-validation, and pipelines, ending with an end-to-end penguin project.

    Your First Model

    5 lessons520

    Nearest Neighbors

    5 lessons520

    Linear Regression

    5 lessons520

    Logistic Regression

    5 lessons520

    Measuring Classifiers

    6 lessons625

    Decision Trees

    5 lessons520

    Overfitting

    5 lessons520

    Cross-Validation

    4 lessons415

    Ensembles

    4 lessons415

    Pipelines

    5 lessons520

    Project: Penguin Species

    5 lessons525

    Final Challenges

    4 lessons420
  4. Start sectionStartExpandCollapseFind structure in data without labels: k-means, hierarchical and density clustering, PCA to see and compress many features, and anomaly detection, ending with a digits exploration project.

    Finding Groups

    5 lessons520

    Choosing k

    5 lessons520

    Reading Clusters

    5 lessons520

    Hierarchical Clustering

    4 lessons415

    Density Clustering

    4 lessons415

    Fewer Dimensions

    5 lessons520

    PCA in Practice

    5 lessons520

    Anomaly Detection

    5 lessons520

    Clusters at Work

    4 lessons415

    Project: Digit Explorer

    5 lessons525

    Final Challenges

    4 lessons420
What you get
Everything you'll use to learn to code

Learn by Doing

Write real code, query databases, build websites, and master AI prompts. Our interactive lessons cover every skill modern developers need.

playground.js
Code Editor
1const greeting = "Hello, Coddy!"
2function sayHi(name) {
3    return greeting + " " + name
4}
5
bottombar Collapse icon
Test #1test Case Success icon
Test #2test Case Success icon
Test #3test Case Failure icon
Input
"Alex"
Output
"Hello, Coddy! Alex"

Build Your Streak

Stay consistent and watch your progress grow! Track your daily coding habit, protect your streak with freeze days, and earn rewards for showing up every day.

12 days streak

Return tomorrow to keep your streak!

fire Filled icon
left icon

January 2026

right icon

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

21

22

23

24

25

26

27

28

29

30

product Double Or Nothing icon

Double or Nothing

Day 5 of 7

fire Freeze icon

Streak Freeze

2 left

You're Not Alone

Compete on global leaderboards, invite friends to earn rewards, and celebrate each other's wins. Coding is better with friends!

Challenger League
Challenger LeagueTop 7 advance
leaderboard First icon1
avatar 1 icon
fire Filled icon
Alex7+ Days
2840
leaderboard Second icon2
avatar 2 icon
fire Filled icon
Jordan7+ Days
2650
leaderboard Third icon3
avatar 3 icon
fire Filled icon
Sam7+ Days
2420
4
avatar 4 icon
Casey
2180
5
avatar placeholder icon
fire Filled icon
Morgan7+ Days
1950
leaderboard Arrow Up iconPromotion zoneleaderboard Arrow Up icon

Every way to learn

Read, listen, test yourself, ask the AI, or look up anything you've already covered. Every lesson meets you where you are.

Intro to Variables
Audio

A variable is a named container that stores a value you can reference later in your program.

In Python, you create one by writing the name, an equals sign, then the value you want to store.

The value can change over time - reassigning the name simply points it to a new value.

1xSarah

Earn a Certificate

Earn certificates for every course you complete. Add them to your LinkedIn profile and resume to showcase your coding expertise to employers.

CoddyCertificate of Completion
This certifies thatJohn Doehas successfully completed
python iconPython Fundamentals
Verified
DateJan 2026
LinkedInAdd to LinkedIn

Why learn machine learning with Coddy

  • You see it before you read it. Every lesson opens with a chart or a diagram: a scatter of iris flowers, a decision boundary, a dendrogram. Then you write the code and your own chart appears in the Plots tab beside it.
  • Real Python, real libraries. numpy, pandas, matplotlib, scipy and scikit-learn run on Coddy, the same versions data scientists use, so model.fit(X_train, y_train) here is model.fit(X_train, y_train) at work. Nothing to install, no notebook to set up.
  • Four sections in the order the work happens: data and plots, statistics for ML, supervised learning, then unsupervised learning. 233 short lessons, each with one new idea and a task that uses it.
  • Real datasets with a story: iris flowers, wine chemistry, handwritten digits, Palmer penguins. You finish two projects, a penguin species classifier and a digit explorer, and every chart is titled and labelled so it could go in a report.

Frequently asked questions about learning machine learning

What is machine learning?

Machine learning is teaching a computer by example instead of by rules. You show a model many rows of data, say flowers with their petal sizes and species, and it learns a pattern it can use on rows it has never seen. If the rows come with answers, that is supervised learning; if they do not and the model finds groups on its own, that is unsupervised learning. This course teaches both.

Do I need to be good at math to learn machine learning?

No. You need school arithmetic and the patience to read a chart. The course teaches the statistics machine learning uses (averages, spread, distributions, correlation, p-values) with simulations and pictures, and scikit-learn does the heavy math for you. Calculus and linear algebra help if you later want to build new algorithms, but you do not need them to train, test and understand models.

Do I need to know Python first?

The basics, yes: variables, if, loops, functions and lists. That is the Fundamentals section of the Python course, a few weeks at an hour a day. Everything after that, import, NumPy, pandas, matplotlib and scikit-learn, is taught here from the first line.

Which Python libraries will I learn?

The standard machine learning stack: NumPy for arrays, pandas for tables, matplotlib for charts, SciPy for statistics and scikit-learn for the models (k-nearest neighbors, linear and logistic regression, decision trees, random forests, gradient boosting, k-means, DBSCAN, PCA and more). They run on Coddy at current versions, so what you write here runs the same on your own computer.

Do I need a GPU or a powerful computer?

No. Your code runs on Coddy's servers and the charts come back to your browser, so a laptop, a Chromebook or a tablet is enough. Classic machine learning with scikit-learn runs fine on an ordinary processor anyway; a GPU matters for training large neural networks, which this course does not cover.

What can I build after this course?

Models that answer real questions from a table: is this email spam, which customers are likely to leave, which species is this penguin, how many bikes will be rented tomorrow, which groups of shoppers exist, which server readings look wrong. You also learn to judge them honestly with test sets, cross-validation, confusion matrices and ROC curves, which is what makes a model worth trusting.

How long does it take to learn machine learning?

This course is 233 lessons in 4 sections, about 40 hours at your own pace, or two to three months at half an hour a day. The Data Science path puts it in order after Python and SQL. After it, the fastest way to grow is to take a public dataset you care about and repeat the project workflow from the course on it.

Is this machine learning course free?

Yes. The lessons, the charts, the AI hints and the certificates are free. A free account works through a few lessons a day, and Pro removes the daily limit.

Learning paths that include this course

This course is one step of a longer path: several courses in the order a mentor would teach them, each with its own free certificate.

Coddy programming languages illustration

Learn Machine Learning with Coddy

GET STARTED