Data Science
WDIS AI-ML Series: Module 3 Lesson 1: What is a Machine Learning Model?
Vinay Roy
Introduction
This chapter introduces what a machine learning model truly is: a learned mathematical function that maps inputs to outputs. It explains how models differ from algorithms, how supervised and unsupervised learning work, and why models matter inside real business decision systems.
Table of Contents

Key Takeaways

WDIS AI-ML Series: Module 3 Lesson 1: What is a Machine Learning Model?

Machine learning is often introduced through algorithms: linear regression, decision trees, neural networks, clustering methods, and so on. But before we can understand why one algorithm works better than another, we need to understand the central object that all of machine learning is built around:

the model.

A machine learning model is not simply code, and it is not the dataset itself. It is not even the algorithm. Instead, a model is the learned mathematical relationship between inputs and outputs, the mechanism by which machines turn data into predictions, decisions, or structure.

This chapter introduces the foundational question:

What is a machine learning model, and what role does it play inside real business systems?

We will begin with the simplest definition, then expand into the different kinds of models, the problems they solve, and how organizations use them to create value.

3.1 Models as Mathematical Functions: f(x)→y

At its core, a machine learning model is a function.

In mathematics, a function maps an input to an output:

y = f(x)

In machine learning, the same idea applies:

  • x represents the input data (features)
  • y represents the output we want to predict
  • f(⋅) represents the model

So a machine learning model can be written as:

y^ = f(x)

Where:

  • y^ is the model’s predicted output
  • f(x)is the learned relationship from data

What does this mean in practice?

Suppose we want to predict the price of a house.

  • Input features x might include:
    • square footage
    • number of bedrooms
    • neighborhood
    • year built
  • Output y is the sale price

A model learns a function: Price=f(Size, Bedrooms, Location, Age,… )

Once trained, the model can take a new house it has never seen before and produce a predicted price.

This is the simplest mental model of machine learning:

A model is a learned function that maps inputs to outputs.

3.2 How Models Are Learned From Data

Unlike traditional programming, machine learning does not require us to manually write the rules.

In traditional software, we specify logic explicitly:

  • If income > threshold, approve loan
  • If password incorrect, deny access
  • If temperature < 0, display warning

Machine learning works differently.

Instead of writing rules, we provide examples:

  • houses and their sale prices
  • customers and whether they churned
  • transactions and whether they were fraudulent

The model learns the function f(x) by finding patterns in these examples.

This is why machine learning is often described as:

Programming with data instead of programming with rules.

3.3 Models as Prediction Engines vs Explanation Engines

In organizations, machine learning models are built for two broad purposes:

  1. Prediction
  2. Explanation

Although these often overlap, they are not the same.

Models as Prediction Engines

Many models exist primarily to generate accurate predictions.

Examples include:

  • predicting demand next week
  • detecting fraud in real time
  • recommending products a user will click
  • forecasting customer churn risk

In these settings, the model is treated as an engine:

Input data goes in, prediction comes out, and business action follows.

The model does not need to explain itself perfectly. It needs to be correct often enough to drive measurable improvement.

Models as Explanation Engines

Other models are used because organizations want insight, not just output.

Examples include:

  • understanding what drives churn
  • identifying the strongest predictors of loan default
  • learning which features matter most in pricing

In these cases, interpretability becomes essential.

A model is valuable not only because it predicts yyy, but because it helps answer:

  • Why is this happening?
  • What variables matter?
  • What should we change?

Tradeoff in practice

Highly complex models (deep neural networks) may provide strong predictive power but limited interpretability.

Simpler models (linear regression, decision trees) may be easier to explain but less accurate.

Real organizations must choose based on context:

  • In marketing personalization, prediction dominates
  • In credit approval, explanation and accountability dominate

Thus, models are not purely technical artifacts—they are tools embedded in decision environments.

3.4 Supervised vs Unsupervised Learning

Machine learning models can be grouped by the type of learning problem they solve.

The most fundamental distinction is between:

  • supervised learning
  • unsupervised learning

Supervised Learning: Learning With Labels

In supervised learning, we train a model using historical examples where the correct answer is known.

Each training example contains:

  • input features x
  • target label y

The model learns:

f(x)≈y

Common supervised tasks include:

  • regression: predicting a number
  • classification: predicting a category
Example: House Price Prediction (Regression)

We know the sale prices of homes in the past.

We train a model on labeled data:

  • features: square footage, location
  • label: sale price

Then we predict prices for new homes.

Example: Fraud Detection (Classification)

We know which transactions were fraudulent.

The model learns patterns that separate: fraud and non-fraud

Supervised learning is the most common form of machine learning in business because organizations often have historical outcomes.

Unsupervised Learning: Learning Without Labels

In unsupervised learning, we do not have a target label y.

Instead, the goal is to discover structure in the data.

The model learns patterns such as:

  • clusters
  • similarity
  • latent structure
Example: Customer Segmentation (Clustering)

Suppose we have customer data:

  • purchase frequency
  • spending level
  • product preferences

But we do not have a label like “high value” or “low value.”

Instead, we want the model to group customers into segments:

  • budget shoppers
  • premium loyalists
  • seasonal buyers

This is unsupervised learning.

It does not predict a known outcome. It reveals structure.

Key Difference

3.5 Algorithms vs Models: A Critical Distinction

One of the most common confusions in machine learning is mixing up algorithms and models.

They are not the same.

Algorithm

An algorithm is the learning procedure.

Examples:

  • gradient descent
  • decision tree splitting
  • boosting
  • backpropagation

An algorithm describes how learning happens.

Model

A model is the result of learning.

It is the trained function f(x) that makes predictions.

Example:

  • Linear regression is an algorithmic family
  • The fitted equation with specific coefficients is the model

So:

  • Algorithm = recipe
  • Model = finished dish

Why this matters in practice

In organizations, teams rarely deploy “an algorithm.”

They deploy a trained model:

  • with specific parameters
  • trained on a specific dataset
  • tuned for a specific business metric
  • monitored over time

Thus, models are operational assets, not abstract algorithms.

3.6 Practical Example: Prediction vs Grouping

Let us connect these concepts through two real business problems.

Example 1: Predicting House Prices (Supervised Regression)

A real estate company wants to estimate sale prices before listing.

Inputs:

  • size
  • bedrooms
  • neighborhood
  • school rating

Output:

  • predicted sale price

This is supervised learning because the historical sale prices are known.

The model is:

Price=f(HouseFeatures)

Example 2: Grouping Customers Into Segments (Unsupervised Clustering)

A retailer wants to understand customer types.

Inputs:

  • purchase frequency
  • spending behavior
  • product categories

Output:

  • clusters such as:
    • high spenders
    • bargain shoppers
    • occasional buyers

This is unsupervised learning because there is no single “correct label.”

The model is:

ClusterID=g(CustomerBehavior)

Here, the goal is insight and structure, not prediction.

3.7 The Role of Models Inside Business Systems

A machine learning model is not valuable because it is mathematically sophisticated.

It is valuable because it becomes part of a decision system.

In organizations, models typically sit inside workflows such as:

  • pricing decisions
  • fraud screening
  • customer support routing
  • marketing targeting
  • inventory forecasting

The model output influences actions.

Therefore, the true role of a machine learning model is:

To convert historical data into repeatable, scalable decisions.

A model is not an academic object.

It is an operational instrument.

Chapter Summary

In this chapter, we established the foundational definition of a machine learning model:

  • A model is a learned mathematical function f(x)→y
  • Models can serve as prediction engines or explanation engines
  • Supervised learning uses labeled outcomes; unsupervised learning discovers structure
  • Algorithms are training procedures; models are the trained results
  • Models create value only when embedded into real business decision systems

Key Deliverable

After completing this chapter, you should be able to explain clearly:

  • what a machine learning model is
  • what kinds of problems models solve
  • how supervised and unsupervised learning differ
  • why models matter beyond the training notebook

Next Chapter Preview

In the next chapter, we will explore the major categories of machine learning problems in more detail:

  • Regression
  • Classification
  • Clustering
  • Ranking and recommendation
  • Forecasting

Because before choosing a model, we must first choose the right problem formulation.

About the author:
Vinay Roy
Fractional AI / ML Strategist | ex-CPO | ex-Nvidia | ex-Apple | UC Berkeley
Subscribe to our newsletter
Subscribe our newsletter to get the latest news and updates!
© 2025 Neuto AI, All rights reserved.
Think. Learn. Evolve.
logo logo