Machine Learning Models: What They Are and How to Build Them

Written by Coursera Staff • Updated on

Machine learning models are the backbone of innovations in everything from finance to retail. Read on to find out more.

[Featured Image]:  A woman with long dark hair and wearing a gray turtleneck sweater. She is sitting in front of two computer screens and is wearing white headphones.

Machine learning models are critical for everything from data science to marketing, finance, retail, and even more. Today there are few industries untouched by the machine learning revolution that has changed not only how businesses operate, but entire industries too.

But what are machine learning models? And how are they built?

In this article, you'll learn how machine learning models are created and find a list of popular algorithms that act as their foundation. You'll also find suggested courses and articles to guide you toward machine learning mastery. 

What is a machine learning model?

Machine learning models are computer programs that are used to recognize patterns in data or make predictions.

Machine learning models are created from machine learning algorithms, which undergo a training process using either labeled, unlabeled, or mixed data. Different machine learning algorithms are suited to different goals, such as classification or prediction modeling, so data scientists use different algorithms as the basis for different models. As data is introduced to a specific algorithm, it is modified to better manage a specific task and becomes a machine learning model.

For example, a decision tree is a common algorithm used for both classification and prediction modeling. A data scientist looking to create a machine learning model that identifies different animal species might train a decision tree algorithm with various animal images. Over time, the algorithm would become modified by the data and become increasingly better at classifying animal images. In turn, this would eventually become a machine learning model. 

Read more: Decision Trees in Machine Learning: Two Types (+ Examples)

Machine learning models vs. machine learning algorithms

Despite their differences, these two terms are often used interchangeably. Machine learning algorithms are programming procedures. They are methods created to solve a problem or complete a task. Machine learning models are the output of these procedures, containing the data and the procedural guidelines for using that data to predict new data.

Placeholder

How to create a machine learning model

Machine learning models are created by training algorithms with either labeled data, unlabeled data, or a mix of both. Four primary machine learning algorithms exist:

  • Supervised learning: Supervised learning occurs when an algorithm is trained using “labeled data,” or data that is tagged with a label so that an algorithm can successfully learn from it. Training labels help the eventual machine learning model know how to classify data in the manner that the researcher desires.

  • Unsupervised learning: Unsupervised algorithms use unlabeled data to train an algorithm. In this process, the algorithm finds patterns in the data itself and creates its own data clusters. Unsupervised learning and pattern recognition are helpful for researchers who are looking to find patterns in data that are currently unknown to them.

  • Semi-supervised learning: Semi-supervised learning uses a mix of labeled and unlabeled data to train an algorithm. In this process, the algorithm is first trained with a small amount of labeled data before being trained with a much larger amount of unlabeled data. 

  • Reinforcement learning: Reinforcement learning is a machine learning technique in which positive and negative values are assigned to desired and undesired actions. The goal is to encourage programs to avoid the negative training examples and seek out the positive, learning how to maximize rewards through trial and error. Reinforcement learning can be used to direct unsupervised machine learning.

Read more: 7 Machine Learning Algorithms to Know

What are parameters in machine learning?

Before machine learning engineers train a machine learning algorithm, they must first set the hyperparameters for the algorithm, which act as external guides that inform the decision process and direct how the algorithm will learn. For instance, the number of branches on a regression tree, the learning rate, and the number of clusters in a clustering algorithm are all examples of hyperparameters. 

As the algorithm is trained and directed by the hyperparameters, parameters begin to form in response to the training data. These parameters include the weights and biases formed by the algorithm as it is being trained. The final parameters for a machine learning model are called the model parameters, which ideally fit a data set without going over or under. 

While a machine learning model’s parameters can be identified, the hyperparameters used to create it cannot.

Types of machine learning models

There are two types of problems that dominate machine learning: classification and prediction. 

These problems are approached using models derived from algorithms designed for either classification or regression (a method used for predictive modeling). Occasionally, the same algorithm can be used to create either classification or regression models, depending on how it is trained. 

Below you will find a list of popular algorithms used to create classification and regression models. 

Classification models

  • Logistic regression 

  • Naive Bayes 

  • Decision trees 

  • Random forest 

  • K-nearest neighbor (KNN)

  • Support vector machine

Regression models 

  • Linear regression

  • Ridge regression 

  • Decision trees

  • Random forest 

  • K-nearest neighbor (KNN)

  • Neural network regression

Learn more about ML with expert-level guidance on Coursera

Whether you’re looking to become a data scientist or simply want to deepen your understanding of the field of machine learning, enrolling in an online course can help you advance your career.

In Stanford and DeepLearning.AI's Machine Learning Specialization, you'll master fundamental AI concepts and develop practical machine learning skills in a beginner-friendly, three-course program by AI visionary Andrew Ng.

DeepLearning.AI’s Deep Learning Specialization, meanwhile, teaches you how to build and train neural network architecture and contribute to developing machine learning systems.

Keep reading

Updated on
Written by:

Editorial Team

Coursera’s editorial team is comprised of highly experienced professional editors, writers, and fact...

This content has been made available for informational purposes only. Learners are advised to conduct additional research to ensure that courses and other credentials pursued meet their personal, professional, and financial goals.