Machine Learning
TL;DR
Machine Learning is the field of AI where a system learns from data and experience instead of being programmed step by step for every task. Here I explain its relationship with Deep Learning and generative AI, the learning types (supervised, unsupervised, and reinforcement), key algorithms, and everyday uses.
Introduction to Machine Learning (ML)
Machine Learning (ML) is a subfield of Artificial Intelligence (AI) that enables computing systems to learn and improve from past experience without being explicitly programmed for every single task.
Inside the broader “field” of Artificial Intelligence, we have other major branches such as systems built with ML, Deep Learning, and then Generative AI (such as ChatGPT or Gemini).

Still do not know what Artificial Intelligence is? Click Here.
Let us take a closer look and unpack some of the main concepts shown in the image above.
As we can see, Deep Learning (DL) is a subcategory of ML that uses deep artificial neural networks with many layers to model and understand complex patterns in data (essentially powered by advanced mathematics).
The “depth” of those networks (meaning the number of layers) allows DL models to learn data representations at multiple levels of abstraction, making them highly effective at tasks like image recognition, natural language processing (NLP), and more.
Finally (in this simplified breakdown), Generative AI, such as GPT (Generative Pre-trained Transformer) and Gemini models, is a specific DL application focused on generating new data (like text, images, or audio) from learned patterns.
Those models are built on deep neural network architectures, specifically those using mechanisms like transformers to process massive amounts of data and produce outputs that look as though they were created by humans.
If that felt a bit confusing, do not worry at all, especially if this is your first contact with the subject.
Simply taking the time to read this right now already puts you in the top 1% who understood how important it is to keep up and learn about the world of AI.
So take a deep breath and come with me..
Let us look at a bit of history..
A Brief History of ML
The concept of Machine Learning goes back to the 1940s and 1950s, with the creation of the first algorithms designed to mimic human learning.
A major milestone was the invention of the Perceptron in 1957 by Frank Rosenblatt, widely regarded as one of the earliest artificial neural networks.

In the decades that followed, computer hardware evolved and growing computing power unlocked major progress in the field.
In the 1990s, the rise of techniques like Support Vector Machines (SVM) and Decision Trees helped solidify the discipline.
In the 2000s, with exponential data growth and new processing methods, ML became fundamental to applications such as speech recognition, computer vision, and recommendation systems.
Today, ML sits at the core of innovations like autonomous vehicles, virtual assistants, and predictive analytics.
Now let us examine the main learning categories..
Learning Categories in Machine Learning
Supervised Learning
Supervised Learning is the most common approach in Machine Learning and involves building predictive models based on labeled data (“labeled” simply means that each input data point has a matching expected output attached to it).
The algorithm’s goal is to learn how to map those inputs to outputs accurately so that when presented with unseen new data, it can predict the right outputs.
Let us take a look at the image below:

There are different ways to explain this diagram, and I will keep it simple.
The name “supervised” comes from the fact that the data used to train the model has already been organized (labeled) with the correct class or answer.
This dataset is commonly split using a 70/30 rule, where 70% goes toward training the model and 30% toward testing it (the exact percentages vary case by case).
In the diagram, the dataset contains labeled animal images such as Cow, Elephant, and Camel.
Those labeled examples are fed to run the algorithm, which undergoes supervised training and adjusts its weights against the Desired Output.
After processing, the model is tested: we can feed it new animal photos (as in the example) and ask it to tell us whether what it “sees” is a Cow, an Elephant, or a Camel.
Another practical example is a linear regression model (one type of algorithm) that predicts the price of a house based on features such as square footage, number of bedrooms, garage spots, neighborhood, and so on.
In this scenario, the model must be trained on a broad dataset already labeled with the attributes of many properties paired with their actual prices.
During training, the model tunes its parameters to minimize the gap between predicted prices and the real prices in the training set.
That way, when a new listing enters a real estate agency, for instance, the model can be used to benchmark the listing price, analyze deal viability, estimate profit margins (commissions), and more.
Unsupervised Learning
Unsupervised Learning, by contrast, works with data that has no predefined labels.
In this setup, the algorithm is responsible for uncovering hidden patterns or structures inside the data without prior guidance.
This discovery process is especially useful when labels are unavailable or would be far too expensive to collect.
Let us examine the image below, keeping our animal example:

The process starts with raw input data (images of animals) that carry zero labels attached.
The feed includes pictures of elephants, camels, and cows, yet the system has no prior knowledge of what those animals are called.
The algorithm scans the raw inputs and looks to spot similarities or patterns across them.
At this stage, the system begins noticing that some images share matching visual traits, even without knowing what those traits mean.
An unsupervised learning algorithm, such as K-means or another clustering method, processes the data to group images based on intrinsic features like shape, size, color, and so on.
In this example, the algorithm may spot that some images have large ears and trunks (elephants), while others have two humps (camels), and so forth.
The final output is that the algorithm groups the images logically: elephants land in one cluster, camels in another cluster, and cows in another.
Crucially, even though the algorithm cleanly separated the groups, it still does not know the names of those groups (elephants, camels, cows).
It only knows that the images inside each cluster share matching characteristics.
Got the logic?
Let us wrap up this section with another practical example.
Picture a LARGE retail enterprise, for example..
That company wants to segment its customer database to target marketing campaigns more effectively, yet it has no clear labels showing who the best buyers are for each specific product line.
Using a clustering algorithm like K-means, the company can group customers into segments based on buying behavior, visit frequency, and average order value, without predefined labels.
Each cluster uncovered by the algorithm can represent a distinct market segment, such as frequent shoppers, “coupon/discount hunters,” late-night buyers, and so on..
That allows the business to build far better-targeted marketing campaigns.
In short, unsupervised learning is a powerful discovery tool in Machine Learning, enabling teams to uncover hidden patterns and segment data intuitively without needing prior labels.
Reinforcement Learning
Reinforcement Learning is an approach inspired by how living beings learn from their environment.
In this paradigm, an agent (an algorithm or robot) interacts with an environment and learns to make sequential decisions aimed at maximizing a cumulative reward.
The agent receives feedback in the form of rewards or penalties based on its actions and adjusts its strategy over time to improve performance.
If something like training a dog came to mind, you are right on target!
To put it in context and make it even clearer, let us look at another diagram below:

First let us break down the image; the logic is super simple..
Initial State (𝑆𝑡): The loop begins with the agent observing a given state in the environment (its current situation).
Action (𝐴𝑡): The agent chooses to take a specific action. That action can be anything affecting the environment, like moving right in a maze, adjusting speed in a self-driving car, or selecting a reply in a chatbot.
Environment: After the agent’s action, the environment reacts and shifts state. For instance, if the agent moves right, the environment updates to reflect the agent’s new position.
Reward (𝑅𝑡): The environment also gives the agent a reward based on the action taken. That reward can be positive (if the action helped) or negative (if the action hurt). The agent’s goal is to maximize total rewards over time.
Next State (𝑆𝑡+1): The agent then observes the new state of the environment after its action and receives the matching reward. That new state becomes the starting point for the agent’s next decision.
Repeating the Loop: This decision-and-feedback cycle keeps running, with the agent updating its choices based on past rewards and how the environment evolves.
Now, so we do not lose the thread, let us go back to the model tasked with identifying whether a picture shows a Camel, a Cow, or an Elephant..
Only this time using Reinforcement Learning..

Initial State (𝑆𝑡): The robot starts by observing an image in its environment, say a photo of an elephant, camel, or cow, without knowing yet which one it is.
Action (𝐴𝑡): The robot can “choose” to classify the picture as “Elephant,” “Camel,” or “Cow.”
Environment: Depending on the robot’s choice, the environment serves a new image to classify while returning feedback on the previous choice.
Reward (𝑅𝑡): If the robot classifies the image accurately, it receives a positive reward (for instance, +1 score point). If it misses, it gets a negative reward (for instance, -1 point).
Next State (𝑆𝑡+1): The robot now sees the next image and the loop repeats. It refines future choices based on past rewards to push accuracy higher over time.
Now that we have taken this important step in understanding Machine Learning, let us look at those algorithms..
Main Machine Learning Algorithms
Machine Learning spans a variety of algorithms, each with its own mechanics and real-world uses.
These algorithms are core tools for turning raw data into actionable insights, letting systems make predictions, spot patterns, and support decisions based on complex inputs.
Below, I explore some of the most important and widely used algorithms in Machine Learning.
Regression Algorithms
Linear Regression
Linear Regression is one of the simplest and most widely used algorithms in Machine Learning, especially for continuous prediction tasks.
Its goal is to model the relationship between a dependent variable (what you want to predict) and one or more independent variables (the factors driving the prediction).
The linear regression model searches for the best-fit straight line (or plane, in multivariate cases) that minimizes the gap between the model’s predictions and actual observed values.
Practical Example: As mentioned earlier, predicting real estate prices from variables like square footage, location, number of bedrooms (and en-suite bathrooms), garage spaces, etc.

Logistic Regression
Although its name sounds similar to Linear Regression, Logistic Regression is used primarily for binary classification problems, where the goal is to estimate the probability that a dependent variable belongs to one of two categories.
Instead of fitting a direct linear relationship, logistic regression applies the logistic (or sigmoid) function to map outputs into probabilities.
Practical Example: Sticking with real estate, you can build a model that estimates the probability of a property selling, returning “Yes” (high likelihood of sale) or “No” (low likelihood of sale).

The output is a probability between 0 (No) and 1 (Yes), which can be turned into a classification (likely to sell or not) using a threshold (for example, if the probability is above 0.5, or 50%, you classify it as “Yes”).
In short, linear regression is used for regression problems where the output variable is continuous (numerical).
Logistic regression is used for classification problems where the output variable is categorical (classes or buckets).
Tree-Based Algorithms
Decision Trees
Decision Trees are powerful, interpretable algorithms that split data into subsets based on sequential questions.
Each node in the tree represents a test on a feature, and the branches represent the possible outcomes of that test, leading down to a leaf node that gives the final prediction.
Decision Trees are highly flexible and work for both regression and classification tasks.
I found an excellent visual diagram showing the decision process around “going to class or not.”

Super easy to understand, right?
There is also Random Forest.
Random Forest
Random Forest is an ensemble algorithm that combines multiple Decision Trees to boost accuracy and reduce the risk of overfitting.
Each tree in the model is built using a random subset of data rows and features.
The final prediction is decided by majority vote (for classification) or by averaging (for regression) the outputs across all individual trees.
Let us look at how it works with a reference diagram:

Let us walk through the flow of steps:
New sample: Represents the incoming data point we want to classify or predict.
Decision trees (green and gray circles): Each decision tree is an individual model inside the forest. They split the data into subsets based on different features, searching for the cleanest separation between classes or the best fit for a continuous number.
Result 1, Result 2, Result 3: Each decision tree outputs an individual prediction for the new sample.
Majority voting / Averaging: The outputs from every tree are combined. In classification problems, the most frequent class across the trees wins as the final Random Forest prediction (majority voting).
In regression problems, the average of all predicted values becomes the final prediction.
Random forest prediction: The final output produced by combining the individual tree predictions.
Practical Example (Well-Known): Predicting loan defaults in a credit portfolio, where Random Forest evaluates multiple variables such as credit history, income, and payment track record to make a robust risk call.
Clustering Algorithms
K-means
K-means is a clustering algorithm that groups data into K distinct clusters (or groups).
The algorithm works by assigning each data point to the nearest cluster based on the mean of the points in each cluster (the centroid).
K-means is efficient and widely used for customer segmentation, market analysis, and other problems where the underlying structure of the data needs to be uncovered.
Hierarchical Clustering
Unlike K-means, Hierarchical Clustering builds a cluster tree, known as a dendrogram.
This algorithm can be agglomerative (starts each data point as an individual cluster and merges them hierarchically) or divisive (starts with a single cluster and splits it iteratively).
It is useful when the data structure is hierarchical or when the number of clusters is not known upfront.
Practical Example: Grouping genes based on similar expressions in molecular biology studies, where hierarchical relationships among genes matter.
Support Vector Machines (SVM)
Support Vector Machines (SVM) is a powerful classification algorithm built around finding a hyperplane that separates data into different classes with the largest possible margin between them.
SVM performs well in high-dimensional spaces and is versatile enough to be used for regression problems (Support Vector Regression, SVR) in addition to classification.
It can apply different types of kernel functions (calculations) to transform the data and find the ideal hyperplane, making it a flexible choice across many problem types.
Imagine you have a dataset that cannot be separated by a straight line.
Kernel functions “transform” that data into a higher-dimensional space, where it can become linearly separable.
It is like taking a flat map and turning it into a 3D globe, letting you draw paths that looked impossible before.
Just like in the image below:

In practice, the SVM algorithm can be used to classify images into different categories.
Each image is represented as a feature vector, which can consist of pixels, color histograms, or features extracted by neural networks.
Remember that example of recognizing Cows, Camels, and Elephants from earlier?
SVM finds the hyperplane that best separates those different image classes in feature space, grouping the species into distinct clusters.
Each of the algorithms you just walked through plays a vital role in Machine Learning, and picking the right one depends on the nature of your data and the problem you want to solve.
In many cases, how well a model performs depends not only on the algorithm chosen, but also on how it is tuned and combined with other models to maximize performance.
Practical Applications of Machine Learning
Machine Learning (ML) has transformed multiple industries by allowing automated systems to handle complex tasks and make data-driven decisions.
Below, I explore some of the highest-impact practical applications of ML across different areas, highlighting how this technology improves user experience, streamlines operations, and opens new business opportunities.
Shopping and Streaming Recommendations
E-commerce: These systems use ML algorithms to analyze each customer’s shopping behavior, such as browsing history, viewed items, and past purchases, to suggest products the customer is most likely to buy.
Based on customers’ buying and browsing habits, Amazon recommends products tailored to each user, increasing conversion rates and customer loyalty.

Media Streaming: Content recommendations on streaming platforms like Netflix and Spotify rely on ML recommendation engines and play a crucial role in suggesting movies, series, tracks, and podcasts that match each user’s tastes and preferences.
Chatbots and Virtual Assistants
Customer Support Automation with chatbots and virtual assistants, such as those used by telecom providers, banks, and online services, is powered by ML algorithms that enable these systems to understand and answer questions in natural language.
These systems use natural language processing (NLP) to interpret user queries and deliver accurate, helpful answers in real time.
By learning from past interactions, the chatbot keeps improving its ability to give more accurate and relevant replies, reducing the need for human intervention and boosting customer support efficiency.
Personal Virtual Assistants
Virtual assistants such as Siri, Alexa, and Google Assistant use ML to understand voice commands, execute tasks, and provide relevant information.

They learn user preferences over time, personalizing responses and suggesting actions based on the user’s habits and interaction history.
Computer Vision
Facial Recognition: Computer vision is one of the fields where ML has made remarkable strides, especially in facial recognition.
This kind of technology powers a wide range of applications, from security to service personalization.

In the photo above, a security camera can be connected to an ML system that identifies objects, people, license plate formats, and vehicle models that passed by at a given time of day or night, and so on.
Facial recognition, in turn, uses ML algorithms to identify and verify individuals based on facial features, even in challenging environments.
The facial recognition technology used on iPhones (Face ID) lets users unlock their devices simply by looking at them.
Video Monitoring and Analysis: Beyond facial recognition, computer vision is also used to analyze live video, identifying objects, actions, or specific events.
In football stadiums, for instance, cameras equipped with computer vision algorithms track player movement, measure speed, and supply real-time data to commentators and coaches, helping optimize team performance.
Speech Recognition
Speech-to-Text Conversion
Speech recognition, a subfield of natural language processing (NLP), has become a foundational tool in devices that need to turn spoken words into text.
Apps like virtual assistants, transcription software, and voice control systems rely on ML to interpret and transcribe speech with high accuracy.
Google Voice, for example, uses ML algorithms to automatically convert what is spoken into written text.
You have probably seen YouTube’s automatic caption generation or online AI tools that produce transcripts straight from videos or video URLs.
This is especially handy for creating documents from dictation, sending messages without typing, or helping people with mobility challenges interact with electronic devices.
Let us look at the basics of how these systems work from the diagram below:

Audio Input (Speech): The process begins by capturing audio, which can be a person’s voice, a recording, or any other sound source.
Visual Representation of Audio: The raw audio is then converted into a visual representation, typically a spectrogram.
Spectrogram: Shows how sound frequencies shift over time. Colors in the spectrogram indicate the intensity of each frequency at a given moment.
Neural Network: The spectrogram is fed into a neural network, which sits at the core of the deep machine learning system (and here it can be a Generative AI model).
Text Output (Text): The AI processes the spectrogram and outputs a sequence of characters or words representing the transcribed text from the original audio.
Voice Control on Devices
Beyond transcription, speech recognition is widely used to operate devices through voice commands.
This ranges from controlling music playback on audio gear to triggering specific car features, such as adjusting air conditioning temperature or starting a GPS route.
Practical Example: Inside Tesla’s infotainment system, drivers can use voice commands to adjust several vehicle settings, including cabin temperature, navigation, and entertainment.
Advantages and Challenges of Machine Learning
Using Machine Learning (ML), as you saw alongside me up to this point, delivers countless advantages that have fueled its adoption across industries.
At the same time, the technology brings significant challenges that need to be addressed if you want to unlock its full potential.
Next, I walk through the main advantages and the most critical challenges tied to ML.
Advantages of Machine Learning
Automation and Efficiency
One of ML’s biggest strengths is its ability to automate complex processes, driving a substantial boost in efficiency.
ML systems can process massive volumes of data in real time, spot patterns, and make decisions autonomously.
That not only saves time, it also lets companies operate at a scale far beyond what manual human effort could sustain.
Rest assured: EVERY LARGE COMPANY you know uses ML.
Continuous Improvement and Adaptability
ML systems are designed to keep learning and improving as they are exposed to more data.
Over time, that means these systems grow more accurate and effective, adapting to new inputs and conditions without needing manual reprogramming.
That self-improvement capability is crucial in dynamic environments where conditions shift rapidly.
Fraud detection algorithms in financial transactions evolve continuously to catch emerging fraud patterns as they appear, becoming more effective over time.
On top of that, ML is heavily used across financial markets for risk analysis, stock trading, and more.
ML has already made plenty of people multimillionaires inside and outside Brazil, both the engineers building it and the asset management and investment firms that hire these specialists and services.
Ability to Handle Large Data Volumes
ML is the right tool whenever you need data analysis at a speed and depth impossible for any human being (even the smartest person you know or who has ever walked this earth).
With the explosion of big data, ML lets companies extract valuable insights from massive datasets that would be impossible to inspect manually in Excel.
That opens the door to discovering hidden correlations, trends, and patterns that sharpen decision-making.
Personalization and User Experience
ML empowers businesses to deliver deeply personalized experiences to their customers.
By analyzing behavioral data and individual preferences, ML systems can tailor offers, content, and recommendations to fit each user’s specific needs, lifting customer satisfaction and retention.
I already talked here about Amazon, Netflix, Spotify, YouTube, and others.
Challenges of Machine Learning
Need for Large Amounts of Labeled Data
One of ML’s main limitations, especially in supervised learning, is the need for large volumes of labeled data to train algorithms effectively.
I already covered those data types above.
Collecting, labeling, and curating that data can be expensive and time-consuming, while also remaining vulnerable to human error.
In fact, adding a practical note here, the largest share of time and planning in an ML project usually goes straight into collecting and structuring the data that will train the model.
In image recognition, for example, a major hurdle is assembling a large enough repository of labeled images, which can demand thousands of hours of manual labor to make sure the dataset is accurate and comprehensive.
Implementation Complexity and Cost
Building and deploying ML solutions can be complex and costly.
Beyond data requirements, crafting accurate models calls for data science specialists, heavy compute infrastructure, and engineering time to build, test, and tune the models.
That investment threshold can easily sit out of reach for small and mid-sized businesses.
For perspective, the infrastructure used to build the Llama 3 (in Portuguese) model family runs in the billions of reais.
Interpretability and Transparency Issues
Many ML algorithms, especially complex architectures like deep neural networks (Deep Learning), are often described as “black boxes” because it is hard to see exactly how they arrive at a given decision.
That lack of transparency becomes a problem especially in sectors where decision explainability is mandatory, such as healthcare and finance.
Anthropic has made notable progress on this front, and you can read a piece explaining how the organization has been cracking open these “black boxes” by clicking here (in Portuguese).
Bias and Ethical Issues
ML models can perpetuate or even amplify biases embedded in the data they were trained on.
If training datasets carry social, economic, or racial prejudices, the model can output unfair or discriminatory results.
This stands as one of the sharpest ethical challenges in ML deployment and demands careful attention and mitigation.
Facial recognition systems trained mostly on images of people from specific ethnic backgrounds can show much higher error rates when identifying other ethnicities, raising serious ethical and legal concerns.
Data Security and Privacy
As ML systems become woven into critical applications, the security and privacy of the training data grow into an escalating concern.
In ML-assisted medical diagnostic systems, for example, significant risks arise around patient data privacy and protecting the system against attacks that could compromise diagnostic accuracy.
Felipe, Are There Free Online ML Courses Worth Taking?
Sure, I will point you to two solid, high-quality options that were still available as of the date this article went live (I just checked).
First, there is a series of courses offered by Kaggle, a well-known international platform for data science, AI, and ML.
You can check it out by clicking here.
And then, of course, there is tech giant Google offering an intensive crash course on ML.
You can access it by clicking here (in Portuguese).
Conclusions
Whoa! You made it to the end..
Even with the extra courses I just shared, this guide on its own already gave you practically a full Course on ML!
Machine Learning sits at the center of the technological shift reshaping industries and improving everyday life.
By letting software systems learn and adapt from data, ML delivers powerful solutions to complex problems, from personalizing product recommendations to automating critical workflows.
Still, putting ML to work effectively calls for paying close attention to its real hurdles, including massive labeled data requirements, implementation complexity, and ethical questions around bias and privacy.
As the technology keeps advancing, both companies and professionals need a clear grasp of what ML can deliver and where its limits sit.
Sign up for my Newsletter below to stay on top of global Artificial Intelligence updates for free, with no ads and straight to the point.
References
Oracle, Google, IBM and Amazon Web Services.