This week we dive into the main categories of machine learning algorithms and explore the pros and cons of each. If you’d like a brief definition of machine learning, please check out last week’s blog.
3 Categories of Machine Learning:
In machine learning, there are multiple algorithms that can be used to model your data depending on your use case, most of which fall under 3 categories: supervised learning, unsupervised learning and reinforcement learning. Each of these has distinct advantages in different situations, depending on the nature of the problem and the desired output.
Supervised Learning:
In supervised learning, both the input and desired output are provided and the machine must learn how to map the former to the latter. To accomplish this, the machine is trained on a statistically representative set of example inputs and corresponding outputs.
An example of this could be teaching a machine to recognize a picture of a dog. You would train the machine by showing it pictures of various breeds of dogs, labeled as dogs as compared to pictures of cats, labeled as cats. When it comes across a picture of a dog, it would recognize it as a dog based on the data on which it had been trained. It does this by computing the specific characteristics, or features, of the input image and comparing them to the features of labeled images or objects.
One pro for this approach is that the system can be better controlled and the accuracy typically increases with the number of labeled examples or patterns provided. On the flip side, qualified people need to label the examples or patterns to be used for training. This can be very time consuming and labor intensive and there are limits to scalability with this approach.
Unsupervised Learning:
In unsupervised learning, the machine is not provided labeled examples or previous patterns on which to base the analysis of the data inputs. The machine must uncover patterns and draw inferences by itself, without having the correct answers. It will classify or cluster data by discovering the similarity of features on its own. Using unsupervised learning, the machine would be fed millions of pictures of dogs, without labeling them as dogs. It would use the text in the web copy or captions associated with the pictures to decipher clues, particularly noting that the word dog often showed up in the various text, and would label the photos as dogs.
A pro here is that you do not need a person to label the examples or patterns and therefore people are not involved in the training. This can also be a con because there is no human interaction to train the machine and initially it will not know if the classifications it makes are right or wrong. There can be more erroneous results initially. The patterns and clusters discovered may or may not be of value to you – this again can be a pro or con. You may discover trends you were not looking for, but you may also not get the results you desire.
Reinforcement Learning:
Reinforcement learning differs from both supervised and unsupervised learning by continuously improving its model based on feedback from experiences. It learns through trial and error – from the consequences of its action and by new choices. As an action is taken, the success of the outcome is graded and receives either a positive or negative score. The algorithm seeks to receive positive scores and the model is trained on continuous feedback. A conceptual example of this could be a self-driving car for which getting from one location to another without crashing would receive a positive score.
The pro of reinforcement learning is that there is a balance between trying what has worked in the past and trying new things to seek further improvement. This means the algorithm is likely to try new actions or classifications in an incremental format and will more likely discover new insights and ways of doing things. Standard supervised learning algorithms can’t achieve this balance. A potential con could be that you can’t incorporate explicit rules later on as you can with supervised learning (e.g. stop at a red light) and that a lot of data inputs may be necessary for the machine to receive the proper feedback. Reinforcement learning can also be quite difficult to implement and requires much expertise.
The Right One For You:
Each type of machine learning has advantages and disadvantages and its success is dependent on the problem you wish to solve and the results you wish to achieve. The important thing is to understand your goals, then identify the types of data necessary, and finally validate the chosen analytics algorithms.
Machine Learning Illustration:
In our third article, AI vs Machine Learning (part 3 of series), we round out our discussion of AI vs. ML vs. Data Mining, comparing and contrasting machine learning vs. AI. Hopefully, this clarifies some of the confusion surrounding what AI means.
Image attribution: BigStockphoto.com