Module 2: Machine Learning Fundamentals

1. Module Introduction: Machine Learning Fundamentals

Description

This is the second module of the AI Fundamentals guide and the first one where you get into technical-conceptual content. In Module 1 you organized the definitions (AI, ML, DL, GenAI) and placed the field in history and in the present; now you're going to go deeper into Machine Learning: how systems that learn from data work, instead of only following hand-programmed rules.

The goal isn't for you to program ML algorithms or master the math behind them (that's for other courses). The goal is for you to understand conceptually how these systems are built, what types there are (supervised, unsupervised, reinforcement), and above all the training vs inference distinction, which is critical for the AI Engineer role. Without this module, when we talk in later modules about "training a Transformer" or "using an LLM via API", you wouldn't have context for what "training" means or why "using" (inference) is different.

This module is designed to be read in about 2-2.5 hours (reading + final exercise). It requires no installations or code; only attentive reading, conceptual diagrams and problem-classification exercises. If after this module someone asks you "what is Machine Learning?" or "how is it different from traditional programming?", you'll be able to answer precisely and with concrete examples.


Analogy: from the instruction manual to learning by experience

Think of traditional programming as giving someone a step-by-step instruction manual: "If the email has the word 'free', mark it as spam. If it has more than 3 exclamation marks, mark it as spam." You write all the rules; the system executes them.

Think of Machine Learning as giving someone lots of examples (thousands of emails labeled as spam or not spam) and telling them: "Learn the patterns yourself. What do the spam ones have in common? What do the non-spam ones have in common?". The system learns the rules on its own, from the data. When a new email arrives, it applies what it learned. If you give it more examples, it can improve.

That's the fundamental difference. Traditional programming: you code the rules. Machine Learning: the system learns the rules from the data. This difference is what explains why today you can have systems that recognize cats in photos (nobody wrote rules like "if it has whiskers and pointy ears..."; the system learned from millions of photos) or that recommend movies (nobody wrote rules like "if you liked X, you'll like Y"; the system learned from millions of users).


Context: where are we in the guide?

In Module 1 you saw that Machine Learning is a subset of AI: systems that learn from data. Here you're going to go deeper into that subset. The guide has 8 modules across 3 phases:

  • Phase 1 — Conceptual foundations (Modules 1-3): You're here. Module 1 gave you the general map (what AI is, history, types); Module 2 (this one) goes deeper into how ML works; Module 3 will go deeper into neural networks (a type of ML that is Deep Learning).

  • Phase 2 — Modern architecture (Modules 4-6): Transformers, LLMs (GPT, Claude, etc.) and the API ecosystem. Everything you'll see there rests on ML: language models are neural networks trained with massive data. Without this module, you wouldn't be clear on what "training" or "model" means.

  • Phase 3 — Application and role (Modules 7-8): What AI Engineering is, how it differs from ML Engineering, and a first AI system design. Here you'll connect everything to the real role: your job will be to integrate already-trained models (inference), not to train them from scratch.

Module 2 is the foundation of everything technical that follows. Don't skip this module; the concepts explained here (supervised, unsupervised, training vs inference) are assumed in later modules.


Module goal

By the end of this module you'll be able to:

  1. Explain what Machine Learning is and how it differs from traditional programming (with concrete examples: spam filter, recommendations, image recognition).

  2. Classify problems by the type of ML they need: supervised (with labels), unsupervised (no labels, look for patterns) or reinforcement (learn by trial and error with rewards).

  3. Understand training vs inference, the most important distinction for AI Engineering: training is when the model learns from data (expensive, long, done by specialized teams); inference is when the already-trained model is used to make predictions (fast, cheap, what you do as an AI Engineer when you call an OpenAI or Anthropic API).

  4. Connect these concepts with products you use: spam filter (supervised: classification), Netflix recommendations (supervised or unsupervised: patterns in history), AlphaGo (reinforcement: playing Go and winning).

  5. Place ML on the guide's map: it's the bridge between "what is AI" (Module 1) and "how neural networks work" (Module 3). Without ML there's no Deep Learning, without Deep Learning there are no Transformers or LLMs.


Prerequisites

For this module you need:

  • To have completed Module 1 (or to be clear on the definitions: AI vs ML vs DL). If you don't know that ML is a subset of AI, review Module 1 lesson 02 before continuing.

  • Curiosity about how systems that "learn" work (spam filters, recommendations, speech recognition, etc.). You don't need to know how to program or to have ever used an ML algorithm.

  • The ability to read conceptual diagrams and examples. This module has simple flow diagrams (e.g. "data → model → prediction") and comparison tables (e.g. supervised vs unsupervised). There's no code or math.

You don't need:

  • ❌ Prior programming. This module has no code; only concepts and examples.
  • ❌ Advanced math (linear algebra, calculus, statistics). Everything is explained with analogies and diagrams; the formulas come in other courses if you need them.
  • ❌ Experience with ML libraries (scikit-learn, TensorFlow, PyTorch). Here you only explain what ML is and how it works; the code comes in the bootcamp or in other technical guides.

If you already have training in another discipline (for example, design, business, product) and want to understand ML in order to work with technical teams, this module is designed for you too: the level is accessible and the focus is conceptual.


Module roadmap: the 7 lessons

Below is the map of the 7 lessons, what you'll see in each and what you'll gain by finishing it.

#LessonWhat you'll seeWhat you'll gainApprox. duration
01Module introductionContext of the guide, module goal, roadmapClarity about what this module covers and how it fits into the guide15 min
02What is Machine Learning?Definition, difference from traditional programming, examplesA clear map of what "learning from data" means and why it's different from "following fixed rules"25 min
03Supervised LearningClassification, regression, examples (spam, price prediction)Understanding the most common type of ML: learning with labels25 min
04Unsupervised LearningClustering, dimensionality reduction, examples (customer segmentation)Understanding how to look for patterns without labels20 min
05Reinforcement LearningAgents, rewards, applications (games, robotics)Understanding the type of ML that learns by trial and error20 min
06Training vs InferenceThe most important distinction for AI EngineeringDistinguishing "training a model" from "using an already-trained model" (critical for your role)25 min
07Exercise: Classifying problemsWhat type of ML would you use for these 10 problems?Practical application: classifying real-world problems by type of ML30 min

Module total: ~2.5 hours (reading + exercise). If you want to go deeper with each lesson's additional resources, you can add 30–60 more minutes.


Why this lesson order

The lessons are ordered deliberately:

  1. General definition (02) before specific types (03, 04, 05): To understand supervised, unsupervised or reinforcement, you first need to be clear on what ML is in general and how it differs from traditional programming. Without lesson 02, the following ones would be lists of terms with no context.

  2. Types of ML (03, 04, 05) before training vs inference (06): The training vs inference distinction applies to any type of ML (supervised, unsupervised, reinforcement). If you read 06 without having seen the types, you wouldn't have mental examples of "what gets trained" or "what gets used afterward".

  3. Training vs inference (06) before the exercise (07): In the exercise you'll classify problems by type of ML; for that you need to know that in every case there's a "learning" phase (training) and a "use" phase (inference). Without lesson 06, exercise 07 would stay at classifying types without understanding the full flow.

If you already have experience and want to go straight to a topic (for example, only training vs inference), you can skip ahead; but the first time it's recommended to read in order so you don't lose the thread.


Connection with the rest of the guide

What you learn in this module is used like this in the following ones:

  • Module 3 (Neural Networks): When we talk about "training a neural network" or "backpropagation", you'll already be clear that neural networks are a type of ML (Deep Learning) and that the training process is what makes them learn from data. That avoids the typical confusion of treating "neural networks" as something separate from "machine learning".

  • Modules 4 and 5 (Transformers and LLMs): Large language models (GPT, Claude, etc.) are deep neural networks trained with massive text data. When you read "GPT-3 was trained on X terabytes of text", you'll already know that's the training phase (expensive, long, done by OpenAI) and that when you call the OpenAI API you're in the inference phase (fast, cheap, what you do). That distinction is the heart of the AI Engineer role.

  • Module 6 (APIs): You'll understand that when you "call a model" via API (for example, OpenAI, Anthropic) you're using a model that already went through the training phase; you only use the inference phase. APIs expose already-trained models to you; you don't train anything (unless you do fine-tuning, which is also training but with your own data).

  • Module 7 (AI Engineering): You'll know that the AI Engineer role is about integrating already-trained models (inference), not training models from scratch (that's ML Engineering). The training vs inference distinction (lesson 06) is the basis for understanding the difference between the roles.


Limits: what this module does NOT do

So you don't expect something we're not going to give, here's what this module does not cover and, where applicable, where it is covered:

  • It doesn't teach you to program ML algorithms or to use libraries (scikit-learn, TensorFlow, PyTorch). That comes in the AI Engineering Bootcamp (for example, Week 2: Python + LLM Access) and in technical guides. Here you only explain concepts.

  • It doesn't get into math (linear algebra, calculus, statistics). The guide is conceptual; there are no formulas or derivatives. If in the future you want to go deeper into how the algorithms work at a mathematical level, there are dedicated courses and books (e.g. Bishop's "Pattern Recognition and Machine Learning"); this module stays at the idea and at concrete examples.

  • It doesn't compare specific algorithms (SVM vs Random Forest vs Gradient Boosting). That's the content of practical ML courses (e.g. Andrew Ng's the global course platform ML, Fast.ai). Here we only give the general types (supervised, unsupervised, reinforcement) so you have the map; the specific algorithms come later if you need them.

  • It doesn't explain how to tune hyperparameters (learning rate, regularization, etc.). That's for when you're already programming models; here we only want you to understand what training is, what inference is, and what type of ML you'd use for which problem.

This module only organizes ideas and gives you the conceptual map. The "how it's programmed" and the "how it's optimized" (code, libraries, math) come in later modules and guides.


Evidence of success: how you know you're ready

You know you've made good use of the module when:

  • You can explain in 2–3 sentences the difference between traditional programming and Machine Learning (with a concrete example: a rule-based spam filter vs a spam filter that learns from examples).

  • You can classify real-world problems into supervised, unsupervised or reinforcement (e.g. "Predict whether a customer will buy or not" → supervised; "Group customers into segments" → unsupervised; "Train a robot to walk" → reinforcement).

  • You can explain training vs inference and why that distinction matters for AI Engineering: training is when the model learns (expensive, long, done by a specialized team or a provider); inference is when the already-trained model is used (fast, cheap, what you do when you call an API).

  • You've completed the lesson 07 exercise: at least 10 problems classified (the type of ML you'd use) with a brief justification.

If any of these things still isn't clear, go back to the corresponding lesson (02 what ML is, 03-05 types, 06 training vs inference, 07 exercise) and review. You don't need to memorize formal definitions; what matters is having the mental map and being able to use it in conversations or when reading documentation.


How to use this module

  • If it's your first time with ML: Read lessons 02 to 06 in order; then do 07 calmly. Don't skip 07: the exercise forces you to apply the concepts to real problems, and that fixes the ideas much better. If you get stuck on 06 (training vs inference), use the analogy of "learning" vs "using what was learned" and think of concrete examples (a spam model that was trained on 1 million emails and now classifies new emails).

  • If you already have some context (for example, you've used ChatGPT or heard about supervised learning): You can skim 02 (general definition) to make sure you're not mixing up terms, and go deeper into 03-05 (types) and 06 (training vs inference). Even so, don't skip 07: the exercise of classifying problems is still useful to organize what you "already knew" with precise vocabulary.

  • If you're going to do the AI Engineering Bootcamp: This module is the recommended basis for understanding what an AI Engineer does (integrating already-trained models, not training them). Having it done beforehand saves time and avoids misunderstandings when the bootcamp talks about "calling a model via API" or "fine-tuning". If you don't have time to do the whole module, at least read lessons 02 (what ML is) and 06 (training vs inference) and do a short version of exercise 07 (5 problems instead of 10).

  • If you get stuck on a lesson: Lessons 03-05 are dense with examples; if you struggle to remember the difference between supervised and unsupervised, think "do I have labels or not?". If supervised (I have labels, e.g. emails marked as spam or not spam), the model learns to predict those labels on new data. If unsupervised (I don't have labels, e.g. I only have customer data without knowing which group they belong to), the model looks for patterns on its own (e.g. it groups similar customers). For reinforcement, think "learning by trial and error with rewards" (e.g. a game: if you win, high reward; if you lose, low reward; the agent learns which actions lead to high rewards).

Each lesson ends with a brief summary and additional resources to go deeper. The exercises in lessons 02 to 06 have solutions or answer guides in <details>; the one in 07 has a classification guide and worked examples. Use all of that to check your reasoning and confirm that you're applying the concepts consistently.


Frequently asked questions

Do I have to memorize algorithms (SVM, Random Forest, etc.)?
No. This module is conceptual: it gives you the general types (supervised, unsupervised, reinforcement) and the training vs inference distinction. The specific algorithms come in practical ML courses if you need them; here it's enough to understand what problem each type of ML solves.

Is this module useful for someone who doesn't want to program?
Yes. It's designed for anyone who wants to understand how systems that "learn" work (spam filters, recommendations, speech recognition, etc.). If your role is product, business, design or communication, this module gives you the vocabulary and the map without requiring code.

Can I skip lesson 06 (training vs inference)?
It's not recommended. That lesson is the most important one in the module for AI Engineering: it explains why your role is to integrate already-trained models (inference), not to train them from scratch (training). Without that distinction, when we talk in later modules about "calling an LLM via API", you wouldn't be clear that you're using the inference phase of a model that OpenAI or Anthropic already trained.

Is exercise 07 mandatory?
To get good use out of the module, yes. Classifying problems with the module's concepts is what closes the loop: you go from "reading definitions" to "applying them". If you have very little time, do a short version (5 problems instead of 10) rather than skipping it entirely.

What do I do if an additional resource (link) is broken or in another language?
The resources are mostly in English (documentation, the global course platform, papers). If a link is broken, search for the resource's title or the course's name on Google; they're usually updated at another URL. If you prefer only material in Spanish, lessons 02 to 06 have enough content in the text; the additional resources are optional for going deeper.

Can I do the module over several days?
Yes. You can do 01 and 02 one day, 03-04-05 another day, and 06-07 another. Ideally, don't leave too much time between 02 (what ML is) and 07 (the exercise), because the exercise applies those definitions; if many weeks pass, review 02 and 06 before 07.


Summary

  • This is Module 2 of the AI Fundamentals guide (Phase 1: Conceptual foundations).
  • The goal is to understand Machine Learning conceptually: what it is, how it works, what types there are (supervised, unsupervised, reinforcement) and the training vs inference distinction.
  • There are 7 lessons: introduction (this one), what ML is, types of ML (3 lessons), training vs inference, and a problem-classification exercise.
  • What you learn here is the foundation for Neural Networks, Transformers, LLMs and the AI Engineer role in the following modules.
  • It does not cover programming, math or specific algorithms; that's covered in other modules or technical guides.
  • You know you're ready when you can explain what ML is, classify problems by type of ML, and understand training vs inference; and when you've completed exercise 07 with at least 10 problems classified.
  • The 3-phase structure (Foundations → Modern architecture → Application and role) builds progressively; this module is the second step.

Next step

When you finish reading this introduction, move on to Lesson 02: What is Machine Learning?. There you'll understand the fundamental difference between traditional programming (you write the rules) and Machine Learning (the system learns the rules from the data). With that you'll have the foundation for the types of ML (supervised, unsupervised, reinforcement) that come next.


Additional resources

  1. Google ML Crash Course: Introduction to ML — Official introduction to ML with interactive examples. In English. Complements lesson 02.

  2. Coursera: Machine Learning Specialization (Andrew Ng) — The reference course in ML; the first module covers what ML is and its types. In English with subtitles. Go deeper after this module.

  3. IBM: What is Machine Learning? — Definition and types of ML (supervised, unsupervised, reinforcement) with usage examples. In English. Useful for contrasting with our definitions.

  4. Elements of AI – Chapter 3: Machine Learning — A free course in several languages (including Spanish) on the fundamentals of AI; chapter 3 covers ML. Useful for practicing with additional exercises.

  5. Fast.ai: Practical Deep Learning for Coders — A practical ML/DL course; the introduction explains what ML is and why it matters. In English. Go deeper if you want to program models afterward.

  6. Stanford CS229: Machine Learning — A complete university course; the first classes cover what ML is and its types. In English. More mathematical; for after this guide if you want academic depth.