Original article was published on Artificial Intelligence on Medium
Your city is overrun by bots and web crawlers. The capabilities of Machine Learning have reached new heights and the world as we know it will never be the same.
- Facial recognition technology that helps users tag and share photos of friends can now tag future friends, night drones are on the prowl.
- Machine learning powered flying cars are now massively available to consumers. The steering wheel has become a thing of the past.
- Recommendation engines that suggest what shows to watch and what products to buy will now display a different suggestions for each user group.
At the dawn of a new age, you can’t help but wonder, what is Machine Learning and how did it pivot our world so drastically?
What is Machine Learning?
While at IBM, Arthur Samuel developed a program that learned how to play checkers (1959). He called it:
“The field of study that gives computers the ability to learn without being explicitly programmed.”
What does this mean?
As developers, we often approach problems in a orderly, logic-based way. We try to determine what our desired outputs should be, and then create the proper rules that will modify our inputs into those outputs.
But in machine learning the story is different. We want the algorithm itself to learn the rules that describe our data the best, by finding patterns in what we know and applying those patterns to what we don’t know.
Machine learning algorithms are able to learn. Their performance gets better and better with each iteration, as it uncovers more hidden trends in the data.
As humans, we have many different ways for learning new things. The way we learned calculus, is probably not the same way you learned to programming. The way we learned the alphabet is wildly different from the way we learned how to differentiate the objects. And then you might not even realize you learned at all!
Similarly, when we think about making programs that can learn, we have to think about these programs learning in different ways. Two main ways that we can approach machine learning are Supervised Learning and Unsupervised Learning. Both are useful for different situations or kinds of data available.
Supervised Learning is where the data is labeled and the program learns to predict the output from the input data. For example, a supervised learning algorithm for recommendation would take as input a set of items purchased. For each purchase, the program would suggest if the user is interested in another product.
Supervised learning problems can be further grouped into regression and classification problems.
In regression problems, we are trying to predict a continuous valued output. Examples are:
- What is the housing price in New York?
- What is the price of tesla stock?
In classification problems, we are trying to predict a discrete number of values. Examples are:
- Is this a picture of a cat or a picture of a dog?
- Is this email spam?
Let’s imagine you’re first learning about different genres in music. Your music teacher plays you an jazz song and says “This is an jazz song”. Then, they play you a hip-hop song and tell you “This is a hip hop song”. Then, they play you a classical track and say “This is classical”. You go through many examples of those genres.
The next time you’re listening to the radio, and you hear jazz, you may think “This is similar to the 5 jazz tracks I heard in class today. This must be jazz!”
Even though the teacher didn’t tell you about that jazz track, she gave you enough examples of songs that were jazz, so you could recognize more examples of it.
When we clearly tell a program what we expect the output to be, and let it learn the rules that produce expected outputs from given inputs, we are performing supervised learning.
A common example of this is image classification. Often, we want to build systems that will be able to identify a picture. To do this, we normally show a program thousands of examples of pictures, with labels that describe them. During this process, the program adjusts its internal variables. Then, when we show it a new example of a photo with an unknown description, it should be able to identify the photo.
When you complete a Captcha and identify the images that have cars, you’re labeling images! A supervised machine learning algorithm can now use those pictures that you’ve tagged to make it’s car-image predictor more accurate.
Unsupervised Learning is a type of machine learning where the program learns the fundamental structure of the data based on unlabeled examples.
Clustering is a common unsupervised machine learning approach that finds patterns and structures in unlabeled data by grouping them into clusters.
- Social networks clustering topics in their news feed
- Consumer sites clustering users for recommendations
- Search engines to group similar objects in one cluster
Let’s say you are an tourist who has been observing the meals people eat. And you see people eating breakfasts, lunches, and snacks. Over the course of a couple weeks, you surmise that for breakfast people mostly eat foods like:
- Granola bars
Lunch is usually a combination of:
- Some sort of vegetable
- Some sort of protein
- Some sort of grain
Snacks are usually a piece of fruit or a handful of nuts. No one especially told you what kinds of foods go with lunch, but you learned from natural observation and put the patterns together.
In unsupervised learning, we don’t tell the program anything about what we expect the output to be. The program itself analyzes the data it encounters and tries to pick out patterns and group the data in meaningful ways.
An example of this includes clustering to create segments in a business’s user population. In this case, an unsupervised learning algorithm would probably create groups based on parameters that a human may not even consider.