Machine Learning

What Is Machine Learning?

How it works, why it matters, and getting started

Machine Learning is an AI technique that teaches computers to learn from experience. Machine learning algorithms use computational methods to “learn” information directly from data without relying on a predetermined equation as a model. The algorithms adaptively improve their performance as the number of samples available for learning increases. Deep learning is a specialized form of machine learning.

How Machine Learning Works

Machine learning uses two types of techniques: supervised learning, which trains a model on known input and output data so that it can predict future outputs, and unsupervised learning, which finds hidden patterns or intrinsic structures in input data.

Machine learning techniques: unsupervised learning (clustering) and supervised learning (classification and regression).

Figure 1. Machine learning techniques include both unsupervised and supervised learning.

Supervised Learning

Supervised machine learning builds a model that makes predictions based on evidence in the presence of uncertainty. A supervised learning algorithm takes a known set of input data and known responses to the data (output) and trains a model to generate reasonable predictions for the response to new data. Use supervised learning if you have known data for the output you are trying to predict.

Supervised learning uses classification and regression techniques to develop machine learning models.

Classification techniques predict discrete responses—for example, whether an email is genuine or spam, or whether a tumor is cancerous or benign. Classification models classify input data into categories. Typical applications include medical imaging, speech recognition, and credit scoring.

Use classification if your data can be tagged, categorized, or separated into specific groups or classes. For example, applications for hand-writing recognition use classification to recognize letters and numbers. In image processing and computer vision, unsupervised pattern recognition techniques are used for object detection and image segmentation. The most common algorithms for performing classification can be found here.

Regression techniques predict continuous responses—for example, hard-to-measure physical quantities such as battery state-of-charge, electricity load on the grid, or prices of financial assets. Typical applications include virtual sensing, electricity load forecasting, and algorithmic trading.

Use regression techniques if you are working with a data range or if the nature of your response is a real number, such as temperature or the time until failure for a piece of equipment. The most common algorithms for performing regression can be found here.

Supervised Machine Learning

Learn how to use supervised machine learning to train a model to map inputs to outputs and predict the response for new inputs.

Unsupervised Learning

Unsupervised learning finds hidden patterns or intrinsic structures in data. It is used to draw inferences from datasets consisting of input data without labeled responses.

Clustering is the most common unsupervised learning technique. It is used for exploratory data analysis to find hidden patterns or groupings in data. Applications for cluster analysis include gene sequence analysis, market research, and object recognition.

For example, if a cell phone company wants to optimize the locations where they build cell phone towers, they can use machine learning to estimate the number of clusters of people relying on their towers. A phone can only talk to one tower at a time, so the team uses clustering algorithms to design the best placement of cell towers to optimize signal reception for groups, or clusters, of their customers. The most common algorithms for performing clustering can be found here.

Clustering is a machine learning method that finds hidden patterns in your data without supervision.

Figure 2. Clustering finds hidden patterns in your data.

Unsupervised Machine Learning

Get an overview of unsupervised machine learning, which looks for patterns in datasets that don’t have labeled responses. This approach lets you explore your data when you’re not sure what information the data contains.

How Do You Decide Which Machine Learning Algorithm to Use?

Choosing the right algorithm can seem overwhelming—there are dozens of supervised and unsupervised machine learning algorithms, and each takes a different approach to learning.

There is no best method or one size fits all. Finding the right algorithm is partly just trial and error—even highly experienced data scientists can’t tell whether an algorithm will work without trying it out. But algorithm selection also depends on the size and type of data you’re working with, the insights you want to get from the data, and how those insights will be used.

Diagram of machine learning algorithms grouped into classification, regression, and clustering.

Figure 3. Machine learning techniques.

Here are some guidelines on choosing between supervised and unsupervised machine learning:

  • Choose supervised learning if you need to train a model to make a prediction, e.g., the future value of a continuous variable, such as temperature or a stock price, or a classification, e.g., identify car makers from webcam video footage.
  • Choose unsupervised learning if you need to explore your data and want to train a model to find a good internal representation, such as splitting data up into clusters.

Why Machine Learning Matters

With the rise in big data, machine learning has become a key technique for solving problems in several areas, such as:

Automotive

Aerospace and Defense

Manufacturing Analytics

Medical Devices

Signal Processing

More Data, More Questions, Better Answers

Machine learning algorithms find natural patterns in data that generate insight and help you make better decisions and predictions. They are used every day to make critical decisions in medical diagnosis, stock trading, energy load forecasting, and more. For example, media sites rely on machine learning to sift through millions of options to give you song or movie recommendations. Retailers use it to gain insights into their customers’ purchasing behavior.

When Should You Use Machine Learning?

Consider using machine learning when you have a complex task or problem involving a large amount of data and lots of variables, but no existing formula or equation.

What's the Difference Between Machine Learning and Deep Learning?

Deep learning is a specialized form of machine learning. A machine learning workflow starts with relevant features being manually extracted from images. The features are then used to create a model that categorizes the objects in the image. With a deep learning workflow, relevant features are automatically extracted from images. In addition, deep learning performs “end-to-end learning” – where a network is given raw data and a task to perform, such as classification, and it learns how to do this automatically.

Figure 4. Comparing approaches to categorizing vehicles using machine learning (left) and deep learning (right).

In machine learning, you manually choose features and a classifier to sort images. With deep learning, feature extraction and modeling steps are automatic.

Choosing Between Machine Learning and Deep Learning

Machine learning offers a variety of techniques and models you can choose based on your application, the size of data you're processing, and the type of problem you want to solve. A successful deep learning application requires a very large amount of data (thousands of images) to train the model, as well as GPUs, or graphics processing units, to rapidly process your data.

When choosing between machine learning and deep learning, consider whether you have a high-performance GPU and lots of labeled data. If you don’t have either of those things, it may make more sense to use machine learning instead of deep learning. Deep learning is generally more complex, so you’ll need at least a few thousand images to get reliable results.

If you choose machine learning, you have the option to train your model on many different classifiers. You may also know which features to extract that will produce the best results. Plus, you also have the flexibility to choose a combination of approaches, use different classifiers and features to see which arrangement works best for your data.

Introduction to Deep Learning: Machine Learning vs. Deep Learning

Learn about the differences between deep learning and machine learning in this MATLAB Tech Talk. Walk through several examples, and learn about how decide which method to use.

Machine Learning with MATLAB

MATLAB makes machine learning easy. With tools and functions for handling big data, as well as apps to make machine learning accessible, MATLAB is an ideal environment for applying machine learning to your data analytics.

With MATLAB, engineers and data scientists have immediate access to prebuilt functions, extensive toolboxes, and specialized apps for classification, regression, and clustering and use data to make better decisions.

MATLAB lets you:

  • Extract features from signals and images using established manual and automated methods, and automatically select features to make models more compact
  • Optimize features by applying various feature engineering techniques
  • Compare approaches such as logistic regression, classification trees, support vector machines, ensemble methods, and deep learning.
  • Apply AutoML to optimize models using hyperparameter tuning and reduction techniques.
  • Integrate machine learning models into enterprise systems, clusters, and clouds, and target models to real-time embedded hardware.
  • Perform automatic code generation for embedded sensor analytics.
  • Support integrated workflows from data analytics to deployment.