← All courses
AI / Beginner

Artificial Intelligence and Machine Learning

Explore how machine-learning systems learn patterns from examples, evaluate performance on unseen data, and support practical decisions responsibly.

▤ 5 modules✓ 5 PDFs✦ 1 researched video lesson
What you’ll learn

Learning objectives

Distinguish AI, machine learning, and common learning settings
Prepare data and define features and labels
Train a supervised model and evaluate it with suitable metrics
Recognize overfitting, leakage, and responsible-use concerns
Video lesson

Learn with freeCodeCamp.org and Kylie Ying

Open on YouTube  ↗
▶

Machine Learning for Everybody – Full Course

freeCodeCamp.org and Kylie Ying · 3h 53m 53s

Covers: Supervised and unsupervised learning, model training, k-nearest neighbors, regression, Naive Bayes, SVMs, neural networks, clustering, and evaluation

Course roadmap

Learn it in 5 modules

0 of 5 completed
MODULE 01Ready to learn

AI, ML, and the learning workflow

A practical workflow defines the task, gathers representative data, separates training and evaluation data, chooses a baseline, trains, evaluates, and documents limitations. A model's output is evidence, not automatically a correct decision.

View key idea and practice
Key idea

Artificial intelligence is a broad field of systems performing tasks associated with intelligent behavior. Machine learning is a set of methods that infer patterns from data to make predictions or decisions.

Worked example

A support team estimates ticket priority from historical messages, then checks whether labels and examples represent current requests.

Try it

Define a prediction task for forecasting energy use and name one input feature, one target, and one risk.

Suggested check

An input may be recent hourly temperature; the target may be next-hour electricity use. A risk is that training data excludes unusual weather and the model fails during a heat wave.

MODULE 02Ready to learn

Supervised learning and data

Split data before fitting preprocessing steps to avoid leakage. Check missing values, units, class balance, and the meaning of every label. Establish a simple baseline so complexity is justified by measured improvement.

View key idea and practice
Key idea

Supervised learning uses examples paired with labels. Classification predicts a category; regression predicts a numeric value. A feature is an input variable used by a model.

Worked example

A model classifies loan applications into predefined risk bands using historical application features, subject to fairness and legal review.

Try it

Classify whether a product review is positive or negative. Identify a feature, label, and a possible source of leakage.

Suggested check

Text tokens or review length can be features; sentiment is the label. A post-review moderation outcome unavailable at prediction time would be leakage.

MODULE 03Ready to learn

Training, validation, and overfitting

Use training data to fit, validation data to choose settings, and a final test set for an unbiased estimate. Regularization, simpler models, more representative data, and careful feature selection can reduce overfitting.

View key idea and practice
Key idea

Training adjusts model parameters to fit examples. Overfitting occurs when a model captures training-specific noise and performs poorly on new examples.

Worked example

A decision tree with a branch for every training record may memorize outcomes; limiting tree depth can improve generalization.

Try it

A model is 99 percent accurate on training data and 68 percent on held-out data. Name a likely issue and a useful next check.

Suggested check

Overfitting is likely. Check the split and leakage, compare performance across simpler models, and verify the held-out data reflects the intended use population.

MODULE 04Ready to learn

Metrics and model evaluation

Do not choose accuracy by habit. In an imbalanced screening task, a model can be accurate by predicting the majority class. Select metrics based on the cost of missed positives, false alarms, calibration, and downstream workflow.

View key idea and practice
Key idea

A metric summarizes a model's behavior for a specific objective. A confusion matrix counts true/false positives and negatives; precision and recall measure different error trade-offs.

Worked example

A fraud-screening system can use recall to measure the share of fraud cases caught while also tracking false alerts that burden investigators.

Try it

For a safety screening task where missed cases are costly, compare recall and precision and say what other measure matters.

Suggested check

Recall captures the share of real positive cases found; precision captures how many flagged cases are truly positive. Review false-positive costs, subgroup performance, and calibration.

MODULE 05Ready to learn

Practical models and responsible use

Start with interpretable baselines such as linear/logistic regression or a small tree. Compare them with more complex methods only when the gain is real. Document intended use, evaluation slices, known limits, and a human escalation path.

View key idea and practice
Key idea

A model is a parameterized function learned from data. Responsible deployment monitors distribution changes, access, explanations, privacy, and the consequences of automated decisions.

Worked example

A city transit team predicts passenger volume but lets planners review events and service changes before acting on the forecast.

Try it

Write two safeguards for using an image classifier in a workflow that affects people.

Suggested check

Measure errors across representative groups and provide human review for high-impact cases. Obtain lawful data, minimize retention, and make uncertain predictions visible.

Take it further

Study materials

5 real PDFs
Artificial Intelligence and Machine Learning

Course introduction

AI, ML, and the learning workflow · Supervised learning and data · Training, validation, and overfitting

8 pages55 KB
Download  ↓
Artificial Intelligence and Machine Learning

Beginner study notes

AI, ML, and the learning workflow · Supervised learning and data · Training, validation, and overfitting

8 pages55 KB
Download  ↓
Artificial Intelligence and Machine Learning

Practical examples

AI, ML, and the learning workflow · Supervised learning and data · Training, validation, and overfitting

8 pages55 KB
Download  ↓
Artificial Intelligence and Machine Learning

Exercises and practice questions

AI, ML, and the learning workflow · Supervised learning and data · Training, validation, and overfitting

8 pages56 KB
Download  ↓
Artificial Intelligence and Machine Learning

Revision summary

AI, ML, and the learning workflow · Supervised learning and data · Training, validation, and overfitting

8 pages55 KB
Download  ↓