How does machine learning work?

Currently used by two-thirds of all companies to recommend products and services, machine learning has already changed, or will soon change, every single industry in the world. Learn how it works.

4 minute read

An Artificial Intelligence brain with circuit board is on learning process. Futuristic design concept. Abstract digital and technology background. Vector Illustration.

Machine learning is a subset of artificial intelligence (AI) that focuses on creating and evolving systems, which have the capacity to leverage historical data and patterns, to make logical decisions and render accurate predictions with minimal or no human involvement. Currently used by two-thirds of all companies to recommend products and services, experts say machine learning has already changed, or will soon change, every single industry in the world as the technology continues to advance. While AI enables machines or systems to think like a human brain by using data to reason, act, adapt, and come to conclusions, machine learning is an application of AI that enables machines or systems to turn raw data into business intelligence (knowledge), and learn from it in an autonomous way. Machine learning vs. natural language processing The global machine learning market is predicted to grow to $225.91bn by 2030 and is already transforming and advancing various industries.

AI Summary

What is machine learning?

Machine learning is a subset of artificial intelligence (AI) that focuses on creating and evolving systems, which have the capacity to leverage historical data and patterns, to make logical decisions and render accurate predictions with minimal or no human involvement.

In the 1950s, AI pioneer Arthur Samuel defined machine learning as “the field of study that gives computers the ability to learn without explicitly being programmed.”

Machine learning algorithms, which are governed and driven by machine learning models, are designed to adaptively improve as the volume of data (i.e., samples) increases. However, the existence of underlying machine learning bias (also referred to as AI bias) has led to erroneous predictions, which in turn have supported flawed and harmful decisions.

Currently used by two-thirds of all companies to recommend products and services, experts say machine learning has already changed, or will soon change, every single industry in the world as the technology continues to advance.

Machine learning vs. AI

While AI enables machines or systems to think like a human brain by using data to reason, act, adapt, and come to conclusions, machine learning is an application of AI that enables machines or systems to turn raw data into business intelligence (knowledge), and learn from it in an autonomous way. Machine learning trains AI to know what to do.

Essentially, machine learning is the engine that enables a system to develop its intelligence. Machine learning is not AI, but rather a pathway to AI.

Machine learning vs. deep learning

Deep learning is a subset (or specialized form) of machine learning. It uses layers of algorithms to build artificial neural networks capable of learning and making decisions autonomously.

If the system starts generating questionable or inaccurate predictions, then a data scientist must get involved and make adjustments. However, the algorithm in a deep learning model has the capacity to determine — on its own — if predictions are inaccurate and can make corrections without human intervention.

Machine learning vs. natural language processing

Another field of machine learning is natural language processing, which focuses on enabling machines and systems to correctly recognize, understand, and respond to how human beings write and speak — which in the technology world is far more diverse and dynamic than relying on the numbers and data that are conventionally used by programmers.

Chatbots such as Apple’s Siri and Amazon’s Alexa are examples of machine learning that leverage natural language processing to understand what people are saying, as well as create new text and perform language translations.

How does machine learning work?

So far, we have looked at a basic definition of machine learning and highlighted some key differences between machine learning and closely associated technologies and techniques. With this foundation in place, we can turn our attention to how machine learning works.

Generally, there are six core steps in building a machine learning model to train AI:

  1. Analyze and clarify the business problem and define what success looks like.
     
    It is critically important to ensure that the goals of the model target business requirements, and not just machine learning requirements (e.g., precision, accuracy, etc.). The fundamental purpose of the model is solving significant, practical, and relevant business objectives — whether that means enhancing travel experiences, making it easier and faster for people to find jobs, or enabling business process automation at scale.
     
  2. Identify data requirements and determine if sufficient data is available to build the machine learning model.
     
    The acronym GIGO (“garbage in, garbage out”) applies here. Without access to a sufficient volume of good data, the machine learning model will be inherently unable to generate accurate and reliable predictions. Ensuring both data quantity and data quality enables the model to fulfill its purpose of training AI.
     
  3. Gather and prepare data
     
    Next, there are a variety of structured (e.g., revenue numbers), unstructured (e.g., customer surveys), and semi-structured (e.g., emails) data preparation activities to cover, such as collection, cleaning, aggregation, augmentation, labeling, normalizing, and transformation.
     
    Investing quality time, effort, and resources here is necessary. Indeed, many otherwise elegant and impressive machine learning models are undermined by gaps in the data preparation process.
     
  4. Train the model
     
    Training data is the dataset used to train the machine learning model and this teaches the algorithm how to make decisions.
     
  5. Evaluate and measure performance
     
    Think of this step in the process as a quality assurance effort that includes tasks like:
    • Model metric evaluation: Quantitative measures to assess the performance and effectiveness of the machine learning model.
    • Confusion matrix calculations: A technique for summarizing the performance of a classification algorithm.
    • Model performance metrics: Those pertaining to regression tasks (e.g., mean squared error, root mean squared error, and R-squared), as well as those pertaining to classification tasks (e.g., accuracy, precision and recall, F1-score, and AU-R (MSE), Root Mean Squared Error (RMSE), and R² (R-Squared). In contrast, classification tasks use metrics like Accuracy, Confusion Matrix, Precision and Recall, F1-score, and AUC-ROC curve).
    • Model quality measurements: These benchmark how well the machine learning model generalizes to unseen data in the target population.

  6. Operationalize and iterate the model
     
    Operationalizing the machine learning model can be a relatively simple process (e.g., generating a report) or a more complex effort (e.g., multi-endpoint deployment). However, even if the model is firing on all cylinders, there is no assurance — and there should be no expectation — that it will remain optimized over time.

Types of algorithmic techniques

There are four types of machine learning techniques, which shape and govern core functions of the model such as classifying information, pattern recognition, predicting outcomes, and making reliable decisions.

Supervised learning
Supervised machine learning is a learning process in which algorithms continuously learn from labeled data, and as such grow smarter and more accurate over time. Labels can be organic (i.e., available in the data itself), or added externally. Examples of supervised learning algorithms include decision trees, support vector machines, random forests, and Naive Bayes.

Supervised learning algorithms are found in applications such as image and speech recognition, recommendation systems, and fraud detection.

With access to relevant data, supervised learning can generate accurate and applicable predictions — which is the core purpose of the machine learning model. However, supervised learning requires a great deal of domain knowledge and human effort to label the data.

Unsupervised learning
Unsupervised machine learning is a learning method in which the model analyzes unlabeled data to find hidden patterns or trends and groups data points into clusters based on similarities or anomalies. For example, some retailers leverage unsupervised learning to predict when certain types of customers are likely to exit the sales funnel. This insight is relied on to adjust and target marketing campaigns and messaging.

K-means clustering is the fastest unsupervised machine learning algorithm to break down data points into groups even when very little information is available.

However, as unsupervised learning is autonomous and does not involve human intervention, the lack of predefined answers during training can make it difficult to measure accuracy and reliability.

Semi-supervised learning
Between supervised learning and unsupervised learning is aptly named semi-supervised learning. With this approach, the model is initially trained using a small number of labeled samples, which are then iteratively applied to a larger volume of unlabeled data (this process is known as pseudo-labelling). Ultimately, the model is trained using a mix of labeled and iteratively labeled data.

One of the core benefits of semi-supervised learning is that the time and costs required for data preparation is significantly lower compared to supervised learning. Furthermore, unlike unsupervised learning semi-supervised learning can apply to a wide range of problems (e.g., classification, regression, clustering, association, etc.). However, the chief disadvantage is that the iteration process is highly complex, and therefore not well-suited for more elaborate problems.

Reinforcement learning
Reinforcement learning uses a trial-and-error approach to learn which actions and decisions are the most favorable over time. At the core of reinforcement learning is a reward system engine that tells the model when it has made a correct decision (and earned a reward) or made an incorrect decision (and is subjected to a penalty).

Reinforcement learning can be extremely effective at solving complex problems. As the model learns from its mistakes and experiences, the reward and punishment engine reduces the likelihood of repeat errors. However, reinforcement learning requires a large volume of data, and maintenance costs can be high.

Excessive reinforcement learning can also lead to an overload of states, which reduces the reliability of results. States are observations that the agent (i.e., the entity or independent program that perceives via sensors and acts through actuators or effectors) receives from the environment.

Examples of machine learning applications

The global machine learning market is predicted to grow to $225.91bn by 2030 and is already transforming and advancing various industries. The following are some real-world examples and applications of machine learning.

  • Finance: Machine learning is used to detect fraud in real-time, automate trading tasks, and enable “robo-advisors” that provide clients with automated financial advice based on their unique portfolio details and risk profile.
  • Business: Companies use machine learning to design chatbots and apps that boost customer engagement, increase sales, and enhance service. Organizations also use machine learning to make data-driven decisions in areas such as recruitment and resource allocation.
  • Insurance: Machine learning is being used to streamline underwriting processes, accelerate customer on-boarding, and reduce operational costs.
  • Genetics and genomics: Machine learning is being used in data analysis within genetics and genomics research to better understand various genetic traits, such as those that contribute to disorders such as hemophilia and diabetes.
  • Healthcare: Machine learning is being used to help hospitals and health networks streamline administrative processes and workflows, while image recognition is enabling pathologists to make faster, better diagnoses.
  • Retail: Machine learning is being used by retailers to identify, organize, analyze, and leverage an immense volume of structured, unstructured, and semi-structured customer data — everything from organic social media communications to purchase transaction history — in order to improve sales, profits, brand recognition, and customer engagement.
  • Education: Machine learning is being used to assess student skill levels and develop guided instructional experience and curriculum that helps them become more proficient.
  • Entertainment: Machine learning is being used by streaming services (e.g., Netflix, Amazon Prime Video, Disney+, Hulu, etc.,) within their recommendation engines to serve subscribers relevant content based on past viewing choices, as well as content that is being accessed by other individuals who share certain preferences or characteristics.
  • Autonomous vehicles: Machine learning is being used in the development of advanced robotics and self-driving cars. Autonomous vehicles leverage computer vision (a type of AI), machine learning, and real-time data from sensors to assist with navigation and decision-making to ensure passenger safety.

These are just a sample of the existing use cases for machine learning. There are also many exciting machine learning developments on the horizon, such as the growth of cloud data ecosystems, to the potential of using quantum computing to optimize algorithms for big data.

The final word

While the world is buzzing about AI (and for many valid reasons), behind-the-scenes and away from the spotlight, machine learning is being used every day in new data science initiatives to transform immense amounts of data into reliable insights that solve important problems and achieve worthy goals: everything from enhancing entertainment, to improving education, to saving lives.

Learn more about machine learning in the Sitecore Knowledge Center.