Introduction to AI and Machine Learning

Mar 24, 2025, 8:59 AM @ 📑 The Office

Have you ever wondered how or why Netflix recommended a particular show to you? I have. That’s why I’m really enjoying Jose Portilla’s highly rated Udemy course on machine learning (ML). To consolidate my learning and document my progress, I’ll be writing a series of articles on what I learn. This is the first of several articles documenting my journey. In this article, I will introduce what machine learning is and what different types there are. In future articles, I hope to cover more of the nuts and bolts of ML by introducing important concepts like cross-validation, regularization, normalization, and the mundane but critical data cleaning and preparation process. Along the way, I hope to find an opportunity to show off some fancy math equations, too!

What is ML, anyway?

Simply put, ML is using computers to find patterns in data and make predictions about it without direct human intervention. It’s based on statistics and calculus: ML algorithms use concepts like linear regression, averages, and derivatives to find patterns in data. ML is very common in today’s world. Common examples include the recommendations you get on platforms like Netflix or YouTube, or the spam filter in your email inbox.

Here’s an analogy that describes what ML is. Below is what’s called an autostereogram. It’s an image that looks like random noise but has a hidden picture in it. You have to look at the image a certain way in order to see the hidden picture, like the one below.

Autostereogram of a shark (from Wikipedia). © Fred Hsu (CC-BY-SA-3.0)

This one’s a 3D image of a shark (supposedly—I could never see the hidden pictures). If you look long enough, you’ll be able to see the picture, but let’s imagine you have some special glasses that let you see the image right away. Well, that’s what ML is. Basically, when you have lots of data, it might be hard to find the patterns inside, but ML helps you find them using statistics. Continuing with this metaphor, one caveat is that your special glasses might need adjustment in order to reveal the hidden image. This is much like doing machine learning, since ML algorithms often need fine-tuning of their settings (called hyperparameters) in order to yield the best results. Data analysts do different tests and techniques to find the right algorithm to fit the data.

Types of ML

I’m learning about two main types of ML, supervised and unsupervised. There are other kinds, for example reinforcement learning, but I won’t be covering those in this article. Supervised learning is all about making predictions. You give past data with the correct answers already “labelled,” and the algorithm finds the pattern based on that. Supervised learning is used for two types of tasks, classifying things (putting them into different categories like email → spam | not-spam) and predicting numerical values like how much revenue a particular sales campaign will generate. A great example of this would be a retail clothing store using historical sales data—like how many boots or jackets were sold last winter—to predict how much of each item to stock for the upcoming season. To do so, the store could collect sales data and information such as weather, promotions run, and ad spending. The data analyst would then train a supervised learning algorithm on that data and use that to make a prediction about how much of each product to stock.

Supervised learning is useful in many situations, but getting labelled data can be very time-consuming and therefore expensive. That’s where unsupervised learning comes into play. Unsupervised learning is less about making specific predictions than about finding patterns in the data. With unsupervised learning, you give all your data to the algorithm, and the algorithm finds patterns and groups similar data points together. This is the sort of ML used for recommendation engines that tell you what shows or videos to watch next on sites like Netflix or YouTube. Netflix might use unsupervised learning to group customers by their viewing habits, and then use supervised learning to predict the likelihood of a customer viewing a particular recommendation. Both types of ML have their distinct use cases.

In reality, many projects may use a combination of both supervised and unsupervised learning. Large language models (LLM) that we’ve all been hearing about in the news from companies like OpenAI (ChatGPT), Anthropic (Claude), and myriad others, all use a combination of labelled and unlabelled data, supervised and unsupervised learning. This is called weak supervision or semi-supervised learning. They use a small amount of labelled data while the majority of the data is unlabelled. Labelled data is expensive because it involves manually marking pieces of data, which can quickly become impractical. Even a small amount of labelled data can greatly improve the quality of a model. I’m excited to learn and write more about how the two types of learning can work together to create bigger and better models.

Where do we go from here?

ML is a general term for several different types of powerful tools that have been around for years. They’ve had a huge impact on our lives. But even though they are powerful, they do come with a steep learning curve and some practical limitations, for example the high cost of labelled data or the need to understand and fine-tune a wide range of ML algorithms. This is why the course I’m taking has 44 hours of video footage just to cover supervised and unsupervised learning. There’s so much to learn.

As I learn more, I will continue to record my progress here on my blog. While I know that ML is responsible for all those video recommendations constantly being thrown at me, I’m excited to continue learning to implement my own models. I look forward to applying what I’ve learned to various things like my personal finances and natural language processing. For example, I’ve undertaken projects to create collections of Chinese text data (corpora) to help my studies and possibly develop language-learning applications, but my limited understanding of ML and statistics has limited my ability to use such data. With what I’m learning now, I will have a much better foundation to delve deeper into passion projects like these.


Profile

Written by Randy JosleynLanguage learner, language teacher, music lover. Living in Beijing, Boise, and elsewhere