An Introduction to Machine Learning
As the field of machine learning grows, it creates more opportunities for computers to help people — here’s how to use it
Every time you write a text message, take a picture with your phone, or buy something with a credit card, you are telling a machine something about who you are and how you interact with the world. And guess what — the machines are listening.
Machine learning is what threw off your Netflix recommendations when your brother watched his weird comedy special on your account. It is why your bank contacted you about strange activity on your credit card when you bought something while on vacation.
What Is Machine Learning?
Put simply, machine learning is the use of algorithms that enable a computer to learn from data. These algorithms allow a computer to be given input data, then to use statistical analysis to determine an output. Machine learning enables a computer to choose its own output without explicit programming. The more data a machine has to work with, the more accurately it is able to predict the correct output.
The heavy use of statistical analysis and the lack of reliance on explicit programming is what sets machine learning apart from other types of programming. Machine learning is also unique because it allows computers to improve their own functionality.
Through machine learning, machines can use data that you create by interacting with them to build an understanding of you. They can then use their understanding of you to predict your behavior. A computer can use this to create suggestions for you (as in the case of our Netflix example). It can also raise an alarm if you deviate from what the machine expects from you, as in our credit card example.
Machine Learning Is Not Artificial Intelligence
Before going deeper into machine learning, there is one important distinction that must be made. Although machine learning is sometimes considered to be artificial intelligence, machine learning and artificial intelligence are not the same.
Artificial intelligence is the idea that machines can do the same activities that usually only a human would be able to do. If you have ever had a conversation with a chatbot, or if you have ever used Siri or Alexa, then you have interacted with artificial intelligence.
While machine learning is not the same as artificial intelligence, it can be a way to achieve artificial intelligence.
How Does Machine Learning Work?
Supervised machine learning
There are three methods through which machines learn: supervised learning, unsupervised learning, and reinforcement learning.
Supervised machine learning
Supervised learning occurs when a computer is fed data with an input and a desired output. Giving the computer both an input and an output allows it to establish a baseline. An example of this would be giving a computer a bunch of pictures of dogs and telling the computer that all of the pictures are of dogs. The computer would later be given pictures of dogs without any labels and should be able to identify which pictures have dogs in them. Eventually, the computer should be able to determine if a picture had a dog in it, no matter what picture it is given.
There are two types of supervised learning: classification and regression.
Classification has a binary output, meaning that the computer will give an output of either true or false. For example, if the computer from the previous example were given a picture of a dog and asked if the picture contained a dog, it would respond with an answer of true. If this computer were given a picture of a fish, it would respond with an answer of false.
Regression returns a value based on an input. Unlike classification, the output of regression can have different data types. For example, the computer could be shown a picture of any animal and give an output of the animal’s species. The computer could also be given a dog’s birth date as an input and return an output of the dog’s age.
Unsupervised machine learning
Unsupervised learning occurs when a computer is given unlabeled data and is left to interpret the data on its own. When a computer learns through unsupervised machine learning, it tries to find similarities within the given input data. For example, a computer could be given many pictures of various animals. The computer would then group the animals. If the computer tries to group the animals based on color, it could wind up grouping fish and birds together. The computer could then do a second round of grouping and group the animal pictures based on if the animals have wings, legs, or fins. In the case of unsupervised learning, the computer may not know what it is looking at but it will still sort the animals based on their attributes. Unsupervised learning is useful for finding connections between large amounts of data.
As with supervised learning, there are also two types of unsupervised learning: clustering and association.
Clustering groups unlabeled data based on similarities. The case of the animal sorting computer is an example of clustering. Clustering is useful not only for grouping data based on similarities but also for identifying anomalies within a dataset.
Association determines how two different objects can be related to each other. For example, a computer could learn that people usually buy a collar and a leash together. If this computer sees a person buying a collar for their dog, it could recommend leashes for the person to buy as well.
Reinforcement machine learning
Reinforcement learning is similar to unsupervised learning in that a computer is given unlabeled data and must decide for itself how to sort this data. However, when using reinforcement learning, when the computer sorts something properly, it is given positive feedback. When it sorts data incorrectly, it is given negative feedback. This is the machine learning equivalent of learning through trial and error.
Machine Learning Algorithms
There are many different algorithms that are used to achieve machine learning. Machine learning algorithms are unique in that they rely heavily on statistics. Some of the most common of these algorithms are linear regression, logistic regression, support vector machines, K-nearest neighbors, and decision trees.
The linear regression algorithm plots data on a Cartesian coordinate system (an X and Y graph) and draws a line through the data. This line is as close to as many data points as possible. This is then used to find relationships between data points and determine a general trend. This can be useful in allowing a computer to make predictions.
Logistic regression and linear regression are similar. With logistic regression, instead of creating a line through the data, the computer creates a curve on the graph, which is based on a sigmoid function.
Support vector machine
As in the case of linear regression, a support vector machine also draws a line on a graph. This line separates data into categories. Data on one side of the line is classified into one category and data on the other side of the line is classified into another category.
The K-nearest neighbors algorithm is another way to categorize data. The computer graphs data and when the computer is given new data, it creates a circle around this new data point and classifies it based on how the other data points within this circle have been classified.
When a computer uses a decision tree algorithm, it creates a flowchart of all possible outcomes of a decision. Each node of the decision tree represents a decision. Each potential outcome, or result of a decision, is represented by a branch. This causes the flowchart to resemble a tree.
How Does Machine Learning Impact You?
There are many ways that you are impacted by machine learning every day. Every time you interact with a device, you supply it with the data that it uses to learn. For example, when you send a text message, you are giving your phone data about your speech patterns, the words you tend to use, and the topics you tend to discuss. Your phone takes this data and uses it to build an understanding of how you talk. When you write a text message, your phone then uses its understanding of you to try to predict what you will say next, based on what you have already said. This is basically how predictive text works.
There are many ways computers use the understanding that they have built of you to try to predict your behavior. They can create suggestions for you, as with the predictive text example. A common way that machine learning creates suggestions for you is through advertisements. When you buy something on Amazon, Amazon’s algorithms suggest similar or related items. If you look something up online, your phone establishes that you have an interest in whatever it was you were researching. If your phone then has a chance to show you an advertisement, it may choose to show you one that is related to what you searched, rather than showing you an advertisement it does not think you will be interested in.
Sometimes computers use their understanding of you to raise an alarm if you deviate from the way it expects you to behave. When you use your credit card to buy something while on vacation or if you make an unusual purchase, you may receive an alert about suspicious activity on your credit card. These kinds of purchases make your bank’s computer think that maybe someone other than you made these purchases because they do not align with the behavior that the computer expects of you.
Machine learning is also being used more and more in the medical industry. Doctors and researchers are using it to accurately diagnose diseases. This is helping doctors develop new methods for identifying and diagnosing diseases.
Machine learning is also revolutionizing image analysis within the medical field. Machine learning allows X-rays, MRI scans, and CAT scans to be analyzed thousands of times faster than traditional image analysis. Combining machine learning and medical image analysis not only identifies diseases, but it can also be used to predict diseases years before a person gets sick.
Machine learning is a powerful tool that can help computers take in a lot of information and quickly make use of it. It gives computers the ability to improve their own functionality and opens many doors for the ways data can be analyzed and processed. It has already impacted your life without you even knowing it, and as the field of machine learning grows, it creates more opportunities for computers to help people.