Outcomes
Students will be able to define machine learning and explain its key distinction from traditional programming approaches.
Students will be able to list and provide examples of real-world applications of machine learning across different industries.
Introduction
Unlike traditional computer programs, machine learning allows computers to learn from data without being explicitly told what to do. This technology changes how we make decisions, receive personalized experiences, and even approach medical diagnoses.
This lesson will cover Machine Learning (ML), the technology behind your email's spam filter, and your streaming service's recommendations. We dive into what machine learning is, explore its application, and discuss why it's revolutionizing so many industries.
Why Is Machine Learning Important?
At this point, ML initiated a shift away from hand-coded rules towards data-driven systems, providing the foundation for more sophisticated AI developments. Allowing the analyst to use the computer to do more of the work, which freed them to spend more of their time interpreting the results and making conclusions
Machine Learning automates tedious tasks, freeing up human time and resources for more strategic work.
What is Machine Learning?
The concept of machine learning dates back several decades, with early developments in the 1950s and 1960s. However, limitations in computing power and data availability hindered its progress in the past. With technological advancements and the proliferation of big data, machine learning has emerged as a powerful tool in various fields. As a result, machine learning has found applications in various fields, such as healthcare, finance, marketing, and cybersecurity.
This kicks off the basic building blocks or subfields of AI. We see the rise of algorithms learning patterns from data to improve their performance without explicit programming.
This “Learning from Data” uses ML algorithms trained on large datasets. It involves using statistical techniques to enable machines to process and analyze large amounts of data, detect patterns, and make predictions or decisions based on that data—all without being explicitly programmed.
The key is that Machine Learning algorithms enable AI systems to handle complex tasks, recognize patterns, and adapt to new situations.
Think of this as “Automation” of testing and learning from data. This replaced data scientists from having to do more manual analysis.
What is an algorithm?
Algorithms are the backbone of all the technology we use daily, from how websites load to how our smartphones make recommendations. An algorithm is like a recipe for a computer. Like a recipe with a list of ingredients and step-by-step instructions to make a dish, an algorithm has a set of instructions for the computer to follow to solve a problem or complete a task.
Let's consider an example of a sorting algorithm, such as the "bubble sort." Imagine you have an unorder pile of numbered cards. The bubble sort algorithm tells the computer to repeatedly compare pairs of cards and swap them if they're in the wrong order.
It keeps doing this until all the cards are sorted correctly. This algorithm may seem simple, but it forms the basis of how computers organize information in many different applications.
Let's review the "Bubble Sort" example. This was the first algorithm I learned in high school, "Introduction to Computers."
Let's start with an unsorted list: 5, 1, 4, 2, 8
Bubble sort does multiple passes (iterations) through the list.
It compares adjacent elements and swaps them if they're in the wrong order.
The largest element, "bubbles," its way to the end of the list with each pass.
The process would continue until the list is fully sorted: 1, 2, 4, 5, 8
Here is the Algorithm's process. The key is it will work on data based on it's method to achieve a result.
Iteration
|
Comparison
|
Action
|
Number Results
|
---|---|---|---|
1
|
5 vs. 1
|
Swap
|
1, 5, 4, 2, 8
|
1
|
5 vs. 4
|
Swap
|
1, 4, 5, 2, 8
|
1
|
5 vs. 2
|
Swap
|
1, 4, 2, 5, 8
|
1
|
5 vs. 8
|
None
|
1, 4, 2, 5, 8
|
2
|
1 vs. 4
|
None
|
1, 4, 2, 5, 8
|
2
|
4 vs. 2
|
Swap
|
1, 2, 4, 5, 8
|
2
|
4 vs. 5
|
None
|
1, 2, 4, 5, 8
|
2
|
5 vs. 8
|
None
|
1, 2, 4, 5, 8
|
3
|
1 vs. 2
|
None
|
1, 2, 4, 5, 8
|
3
|
2 vs. 4
|
None
|
1, 2, 4, 5, 8
|
3
|
4 vs. 5
|
None
|
1, 2, 4, 5, 8
|
This table only shows a few iterations as an example. A longer list would require more iterations.
Applications of Machine Learning
In healthcare, machine learning models can assist in diagnosing diseases, predicting patient outcomes, and identifying potential risk factors. In finance, machine learning algorithms can be used for fraud detection, credit scoring, and automated trading.
Machine learning can help analyze customer behavior and preferences in marketing to develop personalized marketing campaigns. In cybersecurity, machine learning techniques can be employed to detect and prevent cyber threats.
Machine learning powers a wide range of applications that are transforming our world:
Improved Decision-Making - Helps businesses make data-driven decisions in areas like finance, marketing, and logistics.
Personalization - Personalizes experiences across various platforms, like recommending products on e-commerce sites or suggesting music on streaming services.
Spam Filtering - Algorithms analyze email content to identify and filter spam messages.
Self-Driving Cars - Algorithms process sensor data to help self-driving cars navigate roads and avoid obstacles.
Medical Diagnosis: Models can analyze medical images and data to support doctors in diagnosing diseases.
Things To Watch Out For
The effectiveness of machine learning models heavily relies on the quality and quantity of data used for training.
Bias in training data can lead to biased decisions by machine learning models. Mitigating bias is a crucial aspect of responsible AI development.
Real World Examples
The following two examples of machine learning show how the tools are used.
Predictive analytics is a methodology that utilizes historical data and statistical algorithms to forecast future trends and behaviors.
One of my favorite techniques from my retail analytics past is Time Series Analysis. This involves analyzing data to identify patterns and trends over time.
1. Predictive Analytics – What is likely to happen? And What if scenarios?
Predictive analytics is a methodology that utilizes historical data and statistical algorithms to forecast future trends and behaviors. Machine learning models detect patterns, trends, and correlations that may not be immediately apparent.
Answering questions such as “What is likely to happen?” and “What if scenarios?“.
Examples of real-world applications of predictive analytics include;
Analyzing customer behavior to predict future purchasing patterns
Predicting equipment failure in manufacturing processes to prevent downtime
Forecasting sales revenue for the next financial year.
In the below example, the dataset shows the sales of a product over 365 days. This line shows that the data will be a simple linear relationship. Then, we’ll use linear regression to predict future sales. We can extend the red line to use this to predict future sales.
A scatter plot of the actual sales and a line plot of the predicted sales. The blue dots represent the actual sales data, and the red line represents the expected sales. The goal is to make the red line as close to the blue dots.
2. Time Series Analysis - Forecast Future Trends
This technique helps forecast future trends, seasonal patterns, and cyclical trends. Time series analysis can be used in different business areas, such as sales forecasting and financial and economic analysis.
An essential factor in the data points’ analysis is that they are recorded at regular intervals for a predetermined duration rather than sporadically or haphazardly. Its benefits include its ability to provide insights on trends and patterns over time, while its limitations include the need for high-quality data and the challenge of accounting for external factors.
For an excellent overview, see The Complete Guide to Time Series Analysis and Forecasting | by Marco Peixeiro | Towards Data Science.
Time series forecasting occurs when you make scientific predictions based on historical time-stamped data. It involves building models through historical analysis and using them to make observations and drive future strategic decision-making.
Quote Source: Time Series Forecasting: Definition & Examples | Tableau
To sum it up, the appropriate data analytics technique depends on the nature of the data being analyzed and the specific questions being asked. Each method has strengths and limitations, and businesses should consider these factors when selecting a technique. Ultimately, the main goal of using machine learning data analytics is to derive actionable insights that can inform business decisions and improve overall performance.