No matter what field you’re involved in, you’ve probably heard of the phrase “machine learning”. It’s a field that many people don’t know anything about, but it sounds obscure and advanced, all the crucial ingredients of a trending “buzzword.” I’ve found that many of the most “basic” explanations of machine learning are still far too verbose and complicated, so I’ll do my best to explain the gist of machine learning (this is not meant to be super rigorous and formalized, but rather a gentle introduction into the topic of machine learning).

Imagine that you were house-shopping in Silicon Valley, and you found a house that you liked (let’s call this “House A”), and the cost was $1 million — yes, house prices in the Bay Area are ridiculous. How would you determine if this was a fair price to pay for the house? Well, you’ve probably already seen a bunch of houses in the area with similar features as House A — similar square footage, similar amount of bedrooms, similar age of the house, etc. — and the prices of these houses hover around the $1 million range, with some amount of slight deviation. Finally, your conclusion is that the price of House A is fair, because it costs about the same amount as neighborhood houses with similar features. Congratulations, you’ve just performed machine learning.

That’s machine learning? That seems so human! How on earth do you make a computer do something like that? I’m glad you asked, and I’ll introduce a very simple machine learning model: linear regression. I’m quite sure that most of you have performed basic linear regressions, or at the very least, have heard of a “line of best fit” (which is essentially the same thing). In short, if I have a bunch of data points and I perform a linear regression, I can use the equation of the line I just computed, plug in the values of the features of the house, and the output is the predicted cost of the house based on the data I have.

Let’s say that I’m interested in building a tennis club, and I’m looking for land to buy to build my tennis courts on. I’m considering buying Land X that is 2300 square feet and costs $245,000. I’ve done my research on 13 other plots of land in the area, so I decide to practice my machine learning skills and run a linear regression on these 13 existing data points. I calculated the regression line, which gave me a line of best fit with the equation: \hat y = 75x + 75000, where x is the size of the plot of land and \hat y is the predicted price.

Plugging in the square footage of Land X to the equation gives me a predicted price of $247,500, which is more than the actual price that Land X is being sold for; therefore, I buy Land X. I’ve just shown you an example of machine learning that qualifies as a supervised learning problem — a supervised learning problem merely means that the computer is presented with labeled example inputs (land sizes) and their desired outputs (land prices), with the goal to map future inputs to future outputs. This is contrasted with an unsupervised learning problem, in which the computer is fed unlabelled data and is left to figure out the relationship and classify all the data.

One of the most important parts of machine learning is the “learning” part. This simply means that the model gets better at predicting future values the more you train the model; as I give the model more data to work with, it produces better predictions. Intuitively, this makes sense: if I train a price model with 5000 data points, it’s probably going to be better at predicting the price than a model that was trained with only 5 data points.

Let’s return to the land-buying example, but introduce another character: Roger. Let’s assume that Roger also wanted to buy Land X, but he was much more diligent than I was and picked 5000 local plots of land to train his machine learning model (I only picked 13 land plots to train my model). Roger’s model outputs a regression line with the equation \hat y = 50x + 50000, which means his model predicts the price of Land X to be $165,000; therefore, since Land X’s price is $245,000, Roger decides not to buy the plot of land. Even though Roger had the same machine learning model as I did (linear regression), with significantly more training data, his model came to a different predicted price than mine did.

The ultimate takeaway is that machine learning is not nearly as mystical as it might be portrayed. Of course there are many machine learning models that are more complicated than linear regression (like support vector machines and whatnot), but remember, often you don’t need to use the most fancy tools to get a job done properly.