What Is Machine Learning?

Michael Chen | Content Strategist | November 25, 2024

Machine learning has become a household term in recent years as the concept moved from science fiction to a key driver of how businesses and organizations process information. With the pace of data creation continuing to grow exponentially, machine learning tools are pivotal for organizations looking to discover patterns, tease out trends, and chart the most profitable path forward.

How commonplace is machine learning? If you’ve clicked on a recommendation from an ecommerce website or streaming platform, been notified of potential misuse of a credit card, or used transcription software, you’ve benefited from machine learning. It’s used in finance, healthcare, marketing, retail, and many other industries to extract valuable insights from data and automate processes.

What Is Machine Learning?

Machine learning (ML) is the subset of artificial intelligence that focuses on building systems that learn—and improve—as they consume more data. Artificial intelligence is a broader term that refers to systems or machines that mimic human intelligence. Machine learning and AI are often discussed together, and the terms are sometimes used interchangeably, but they don’t mean the same thing.

In short, all machine learning is AI, but not all AI is machine learning.

Key Takeaways

  • Machine learning is a subset of AI.
  • The four most common types of machine learning are supervised, unsupervised, semi-supervised, and reinforced.
  • Popular types of machine learning algorithms include neural networks, decision trees, clustering, and random forests.
  • Common machine learning use cases in business include object identification and classification, anomaly detection, document processing, and predictive analysis.

Machine Learning Explained

Machine learning is a technique that discovers previously unknown relationships in data by searching potentially very large data sets to discover patterns and trends that go beyond simple statistical analysis. Machine learning uses sophisticated algorithms that are trained to identify patterns in data, creating models. Those models can be used to make predictions and categorize data.

Note that an algorithm isn’t the same as a model. An algorithm is a set of rules and procedures used to solve a specific problem or perform a particular task, while a model is the output or result of applying an algorithm to a data set.

Before training, you have an algorithm. After training, you have a model.

For example, machine learning is widely used in healthcare for tasks including medical imaging analysis, predictive analytics, and disease diagnosis. Machine learning models are ideally suited to analyze medical images, such as MRI scans, X-rays, and CT scans, to identify patterns and detect abnormalities that may not be visible to the human eye or that an overworked diagnostician might miss. Machine learning systems can also analyze symptoms, genetic information, and other patient data to suggest tests for conditions such as cancer, diabetes, and heart disease.

The key features of machine learning are the

  • Automatic discovery of patterns
  • Prediction of likely outcomes
  • Creation of actionable information
  • Ability to analyze very large volumes of data

Types of Machine Learning

There are four main types of machine learning. Each has its own strengths and limitations, making it important to choose the right approach for the specific task at hand.

  • Supervised machine learning is the most common type. Here, labeled data teaches the algorithm what conclusions it should make. Just as a child learns to identify fruits by memorizing them in a picture book, in supervised learning the algorithm is trained by a data set that’s already labeled. An example of supervised machine learning is a spam email filter, where the algorithm is trained on a labeled data set in which each email is tagged as either spam or not spam. The model learns from these labeled examples and then can predict whether new incoming emails are likely spam or not based on the patterns it identified. This type of supervised learning requires a human expert to provide the correct answers by labeling data so the algorithm can learn and make accurate predictions in the future.

    Note that the goal here isn’t to train using pristine data. You want to mimic what the system will see in the real world—some spam is easy to spot, but other examples are stealthy or borderline. Overly clean data leads to overfitting, meaning the model will identify only other pristine samples.
  • Unsupervised machine learning employs a more independent approach, in which a computer learns to identify complex processes and patterns without relying on previously labeled data. Unsupervised machine learning not only involves training based on data that doesn’t have labels; there’s also no specific, defined output, such as whether an email is likely spam.

    Unsupervised machine learning tends to spot groupings of similar data, creating clusters. Once trained, the model can identify similar patterns and put that data into its appropriate group. A common use of unsupervised machine learning is recommendation engines, which are used in consumer applications to provide “customers who bought that also bought this” suggestions. When dissimilar patterns are found, the algorithm can identify them as anomalies, which is useful in fraud detection.
  • Semi-supervised machine learning addresses the problem of not having enough labeled data to fully train a model. For instance, you might have large training data sets but don’t want to incur the time and cost of labeling the entire set. By using a combination of supervised and unsupervised methods, you can often achieve a fully trained model. The training process starts off like supervised learning, using labeled data to get initial results and establish guidelines for the algorithm. When labeled data is exhausted, the semi-trained model is given the unlabeled data sets. It uses the training it has and looks at the unlabeled data, with the goal of adding to the labeled data set. If the model can find an appropriate label for a sample with high certainty, that sample is added to the labeled data. The learning process starts again, but now with a larger set of labeled samples. By iterating, more samples are labeled with what’s often called pseudo-labels, and the model can be further refined.

    Reinforcement machine learning, like unsupervised machine learning, uses unlabeled data sets and allows algorithms to evaluate the data. However, reinforcement learning differs in that it’s working toward a set goal rather than exploring data to discover whatever patterns might exist. With an objective in mind, the algorithm proceeds in a trial-and-error process. Each move receives positive, negative, or neutral feedback, which the algorithm uses to hone its overall decision-making process. Reinforcement learning algorithms can work on a macro level toward the project goal, even if that means dealing with short-term negative consequences. In that way, reinforcement learning handles more complex and dynamic situations than other methods because it allows the context of the project goal to influence the risk in choices. Teaching a computer to play chess is a good example. The overall goal is to win the game, but that may require sacrificing pieces as the game goes on.

Which is best for your needs? Choosing a supervised approach or one of the other three methods usually depends on the structure and volume of your data, the budget and hours that can be devoted to training, and the use case to which you want to apply the final model. Whiffing on a suggestion for a blouse to go with a skirt may be inconsequential. Missing a tumor, less so.

How Machine Learning Works

As its name indicates, machine learning works by creating computer-based statistical models that are refined for a given purpose by evaluating training data, rather than by the classical approach where programmers develop a static algorithm that attempts to solve a problem. As data sets are put through the ML model, the resulting output is judged on accuracy, allowing data scientists to adjust the model through a series of established variables, called hyperparameters, and algorithmically adjusted variables, called learning parameters.

Because the algorithm adjusts as it evaluates training data, the process of exposure and calculation around new data trains the algorithm to become better at what it does. The algorithm is the computational part of the project, while the term “model” is a trained algorithm that can be used for real-word use cases.

The scope, resources, and goals of machine learning projects will determine the most appropriate path, but most involve a series of steps.

1. Gather and compile data

Training ML models requires a lot of high-quality data. Finding it is sometimes difficult, and labeling it, if necessary, can be very resource intensive. After identifying potential data sources, evaluate them to determine overall quality and alignment with the project’s existing data integration/repository resources. Those sources form the training foundation of a machine learning project.

2. Select an appropriate algorithm to yield the desired model

Depending on whether the project plans to use supervised, unsupervised, or semi-supervised learning, data scientists can select the most appropriate algorithms. For example, a simpler project with a labeled data set can use a decision tree, while clustering—dividing data samples into groups of similar objects—requires more compute resources as the algorithm works unsupervised to determine the best path to a goal.

3. Refine and prepare data for analysis

Chances are that incoming data won’t be ready to go. Data preparation cleans up data sets to ensure that all records can be easily ingested during training. Preparation includes a range of transformation tasks, such as establishing date and time formats, joining or separating columns as needed, and setting other format parameters, such as acceptable significant digits in real number data. Other key tasks include cleaning out duplicate records, also called data deduplication, and identifying and possibly removing outliers.

4. Educate the model through training

Once the desired final model has been selected, the training process begins. In training, a curated data set, either labeled or unlabeled, is fed to the algorithm. In initial runs, outcomes may not be great, but data scientists will tweak as needed to refine performance and increase accuracy. Then the algorithm is shown data again, usually in larger quantities to tune it more precisely. The more data the algorithm sees, the better the final model should become at delivering the desired results.

5. Assess model performance and accuracy

After the model has been trained to sufficient accuracy, it’s time to give it previously unseen data to test how it performs. Often, the data used for testing is a subset of the training data set aside for use after initial training.

6. Fine-tune and enhance model parameters

The model now is most likely close to deployment. Runs with test data sets should produce highly accurate results. Enhancements happen through additional training with specific data—often unique to a company’s operations—to supplement the generalized data used in the original training.

7. Launch the model

With results optimized, the model is now ready to tackle previously unseen data in normal production use. When the model is live, project teams will collect data on how the model performs in real-world scenarios. This can be done by monitoring key performance metrics, such as accuracy, the overall correctness of the model’s predictions, and recall, the ratio of correctly predicted positive observations. Also consider how the model’s predictions are affecting business outcomes on the ground—is it generating value, whether in increased sales of blouses or better diagnostics?

Conducting regular audits and reviews of the model’s performance can help identify issues or distortions that may have arisen post-deployment and are essential to ensure that the model performs effectively and meets the desired objectives.

How Machine Learning Works

Machine Learning Algorithms

Algorithms are the computational part of a machine learning project. Once trained, algorithms produce models with a statistical probability of answering a question or achieving a goal. That goal might be finding certain features in images, such as “identify all the cats,” or it might be to spot anomalies in data that could indicate fraud, spam, or a maintenance issue with a machine. Still other algorithms might attempt to make predictions, such as which clothing items a buyer might also like based on what’s currently in a shopping cart.

Some of the most common algorithms used in machine learning are as follows:

  • Neural networks: The human brain works by creating networks of nodes that perform functions as varied as processing images from our eyes, storing memories, and controlling our muscles. Computer-based neural networks are modeled after this brain architecture, creating layers of nodes that weigh the relationships between data they’ve analyzed and data in adjacent nodes. Working as a network, these nodes can determine features of data, such as elements within a picture.
  • Linear regression: Linear regression algorithms take data points and build a mathematical equation for a line that best supports predicted outcomes. This is sometimes known as the “line of best fit.” Linear regression works by tweaking variables in the equation to minimize the errors in predictions. An example of linear regression is seen in pediatric care, where different data points can predict a child’s height and weight based on historical data. Similarly, BMI is linear regression that attempts to correlate height and weight to overall body fat. Because the algorithm uses a simple line for its predictions, error rates can be high. For instance, a BMI of 30 indicates obesity. That’s often true for the general public but definitely not for strength athletes such as NFL linebackers.
  • Logistic regression: Best used for binary outcomes, logistic regression is like linear regression but with special considerations at the boundaries of possible data ranges. An example of logistic regression includes pass/fail analysis on the likelihood of converting a potential customer into a paying one. Logistic regression is often used in medical diagnoses—for instance, plasma glucose concentrations over a certain range are used as a strong indicator of diabetes. Logistic regression also can be used to predict whether an email is spam or not, or if a credit card transaction is fraudulent.
  • Clustering: Clustering is a form of unsupervised learning that exposes an algorithm to unlabeled data sets in which data may fall into distinct groups, or clusters. As the algorithm evaluates training data, it searches for patterns and overlapping details between the data and creates groups. Say the algorithm is looking at the nutritional value of a wide variety of fruits. It might find that citrus fruits form one group, berries form another, and melons form a third. This allows for easier understanding of what makes each cluster unique. Clustering is particularly useful for any sort of categorization project, such as market segmentation.
  • Decision trees: Decision trees use supervised learning and basic if-then progressions to make predictions. Depending on the complexity of the project, decision trees can be ideal as resource-light algorithms that produce straightforward results. For example, if a college wanted to determine which students could skip freshman English, it might use a decision tree that first asked if the student had taken four years of English in high school and, if so, whether the student had at least a 3.6 GPA in those classes. Another path might simply ask if the student had scored better than a certain threshold on the reading, writing, and language SAT sections.
  • Random forests: On their own, decision trees come with limitations due to their inherent rigid workflows and requirement that all evaluation questions be answered. In our decision tree example above, the college might require that both conditions be true, even though meeting just one might be sufficient. And there could be other factors to consider, such as how well a student performed on an admissions essay. If all three factors were required, the college would have a problem of requiring an “overfit” to the decision tree. Students who fared well on all three criteria would highly likely be fine without taking English 101. However, others who also would be fine still will be required to take the class. Random forests bring together collections of decision trees that cumulatively weigh outcomes to present a broader perspective. With random forests, projects can still use the core mechanics of decision trees while considering nuanced relationships between relevant data points. So, our college might split these three criteria into separate decision trees and then use weights to decide who can skip English 101 based on finding, perhaps, that doing well in high school English is the most predictive indicator and that performance on the essay is the least.

Beyond Neural Networks

Machine learning uses a vast array of algorithms. While the ones discussed above reign supreme in popularity, here are five less common but still useful algorithms.

Gradient boosting Builds models sequentially by focusing on previous errors in the sequence. Useful for fraud and spam detection.
K-nearest neighbors (KNN) A simple yet effective model that classifies data points based on the labels of their nearest neighbors in the training data.
Principal component analysis (PCA) Reduces data dimensionality by identifying the most significant features. It’s useful for visualization and data compression for, for example, anomaly detection.
Q-learning Employs and agent that learns through trial and error, receiving rewards for desired actions and penalties for making the wrong move.
Support vector machines (SVM) Creates a hyperplane to effectively separate data points belonging to different classes, such as image classification.

Benefits of Machine Learning

Machine learning lets organizations extract insights from their data that they might not be able to find any other way. Some of the most common benefits from integrating machine learning into processes include the following:

  • Streamlining Decision-Making and Predictive Analysis: Data-driven decisions start with data analysis. That’s an obvious statement, but when done manually the analysis process is time- and resource-intensive and may not yield rich enough insights to justify the cost. Machine learning can comb through large volumes of data to identify trends and patterns so that users can focus on queries and actionable results rather than optimizing manual data processing. Depending on the analytics tool, machine learning can generate predictions and identify hard-to-find insights in the data, allowing for a greater depth of analysis and more value to the organization.
  • Boosting Efficiency and Automating Tasks: Machine learning is at the root of many of the technologies that make workers more efficient. Many low-cognition, repetitive tasks—including spell-checking as well as document digitization and classification—are now done by computers, thanks to machine learning.

    Machine learning also excels at the lightning fast, in-the-moment data analysis that’s extremely difficult for humans. Is that transaction fraudulent, or is that email a phishing scam? Machine learning systems can often accurately determine the answer in seconds and automatically take appropriate measures. By combining ML technologies, predictions can be made from data accompanied by explanations of the factors that influenced the prediction, helping executives chart the best paths for their organizations.
  • Personalization and Innovation in Services: Machine learning has opened a new door for customer experiences through personalization. Purchase history, browsing history, demographic data, and additional information can be used to build an individual customer profile, which then can be cross-referenced against similar profiles to make predictions about customer interests. This allows for suggestion engine offerings, auto-generated discounts, and other types of personalized engagement to keep customers returning.

    Using the nomenclature discussed here: Decision trees can help classify customers. Perhaps one customer likes vintage and second-hand fashion while another likes cutting-edge designer garments. Clustering each customer with similar ones can help identify the products they’ll likely click on or whether they’re likely to be highly motivated by sales. ML then can predict the best offers for each customer by considering which clusters they fit in.

Machine Learning Challenges

Machine learning projects are only as effective as the system and resources they’re built with. That highlights the need to invest in proper planning and preparation.

The following are some of the most common challenges facing machine learning projects:

  • Data quality: The adage “garbage in, garbage out” applies to machine learning—the quality of data is critical, during both the training phase and in production. High-quality data can lead to more accurate results delivered in a timely, efficient manner; low-quality data can create inaccuracies and distortion in resultant models. Note that “quality” can mean different things to different projects. For training image recognition systems, the data should represent what the model will see in the real world. That includes subjects in shadows, slightly out of focus, and not looking directly into the camera. For training purposes, the more data resembles what the system will see in production, the better.

    To that end, organizations should vet data sources, transform data sets for consistent and compatible formats, run cleansing and deduplication procedures, train users on process and protocols, and integrate tools to assess quality and fit.
  • Bias: Data may be clean, but is it free from bias? As an obvious case, let’s say you wanted to train a machine learning system to detect dogs in pictures, and you’ve got a robust data set of only Labrador and poodle photos. After training, the model is great at detecting these dogs—you could say it’s biased to do so. But when shown a picture of a bulldog, it says it can’t find a dog. Of course not—it wasn’t trained for that.

    Creating the right training data set is one of the trickiest and most expensive aspects of building ML tools that work the way you want them to. The difficulty of finding certain types of data can often generate an unintended source of bias. For example, the Tibetan mastiff is a rare breed, but the dogs look like an orangish brown Newfoundland. So, if insufficient data samples exist of the Tibetan mastiff, it won’t be too surprising if an ML model identifies it as a Newfie.
  • Data security: Despite its many benefits, machine learning can introduce a range of security issues. The data used in ML analysis may contain sensitive or proprietary information not meant for public consumption. Similarly, data may be the target of a cyberattack meant to poison the model and build misinformation into the results. Data preparation steps can both expose and address security vulnerabilities, particularly when data sets go through export or import processes between systems. To help mitigate security issues, companies must employ an array of security policies, procedures, and controls, including practical staff training.
  • Data privacy: Ensuring sensitive data isn’t disclosed is an ongoing effort. Data anonymization is an emerging practice, but it may not always be available or sufficient. For example, say a company wants to offer a service that allows its business customers to learn more about their end consumers based on data it has collected. This type of information would need to be protected and used consistent with legal requirements, and companies would need to carefully consider new threat vectors that may attempt to compromise the data through an ML system.

Machine Learning Use Cases

Machine learning can provide significant benefits for nearly every industry and every department within an organization. If numbers are crunched and data exists, machine learning offers a way to increase efficiency and derive new kinds of engagement. Common machine learning use cases across industries include the following:

  • Retail: For retailers, machine learning can help operations, sales, and more. On an operations level, machine learning can analyze supply chain data to help optimize inventory management and identify possible delays early on. To help increase sales, machine learning can examine a customer’s search and browse history along with demographics to build a profile that acts as the basis for further engagement.
  • Streaming media: Like retailers, both audio and video streamers can build customer profiles based on a user’s engagement and browsing history and demographic data. This profile then can power recommendation engines that help with discovery and further engagement.
  • Finance: One of the most powerful, yet simple, uses of machine learning is fraud detection for the finance industry. With machine learning, algorithms can identify general account behavior, then begin flagging anomalous behavior for potential fraud investigations.
  • Healthcare: The healthcare industry is primed for using machine learning in nearly every facet of operations. Patient profiles through electronic health records can identify possible issues ahead of time based on patterns compared to similar demographics. Data from Internet of Things devices, such as a smart medication dispenser, can flag errors quickly, and operational data from patient foot traffic or hospital bed use can inform staffing scalability.

Faster, More Secure Machine Learning with Oracle

Machine Learning in Oracle Database offers a spectrum of capabilities and features to accelerate the machine learning process. With the ability to keep data within the database, data scientists can simplify their workflow and increase security while taking advantage of more than 30 built-in, high performance algorithms; support for popular languages, including R, SQL, and Python; automated machine learning capabilities; and no-code interfaces.

For organizations with large data sets, in-database machine learning with HeatWave MySQL negates the need to move data to a separate system for machine learning, which can help increase security, reduce costs, and save time. HeatWave AutoML automates the machine learning lifecycle, including algorithm selection, intelligent data sampling for training, feature selection, and tuning, often saving even more time and effort.

The payoff for machine learning is the ability to analyze and interpret large amounts of data quickly and accurately. Once trained, machine learning models can identify in seconds or minutes patterns, trends, and insights that could take humans weeks to detect—or that might never see the light of day. The result is more informed decision-making, improved problem-solving, and the ability to make data-driven predictions. In addition, machine learning models can automate rote processes, saving time and resources. Machine learning is realizing its potential to revolutionize the workplace and drive innovation.

Machine learning is the key to unlocking value in your data—and the first step in a successful artificial intelligence program.

Machine Learning FAQs

What’s the difference between AI and ML?

Artificial intelligence is the name given to the broad computing subject focusing on building and refining systems to think like humans. Machine learning is a subset of this field that focuses specifically on the computational aspect of the learning process. The two terms are often used interchangeably and face similar challenges, but they exist separately despite this connection.

What are the four main types of machine learning?

The four types of machine learning are as follows:

  • Supervised. Supervised learning uses labeled data sets to train the algorithm toward a specific goal.
  • Unsupervised. Unsupervised learning uses unlabeled data sets that provide the algorithm space to explore and identify patterns.
  • Semi-supervised. Semi-supervised learning uses labeled data sets for initial training to establish the broad parameters of the project. Then the algorithm uses that training to evaluate unlabeled samples to see if it can label them with a high probability. That process can be repeated—with the labeled sample set growing larger on each iteration.
  • Reinforcement. Reinforcement learning acts similarly to unsupervised learning in that it uses unlabeled data sets. However, reinforcement learning focuses on learning the best path to achieve a specific goal through positive, negative, and neutral feedback rather than searching for patterns.

Is it hard to learn machine learning?

Like any technical craft, learning the ins and outs of machine learning is an iterative process that requires time and dedication. A good starting point for machine learning is to have a foundation in programming languages, such as Python or R, along with an understanding of statistics. Many elements involved with evaluating machine learning output require understanding statistical concepts, such as regression, classification, fitting, and parameters.

What is an example of machine learning?

One of the most common examples of machine learning is a suggestion engine. In ecommerce, this is seen as a “you may also like…” product suggestion. In video streaming media, this is seen as ideas for what to watch next. In these cases, the algorithm takes a user’s history and creates predictions for what the user may find interesting—and the more the user adds in data points, the more the algorithm can refine predictions.