Machine learning is divided into mainly three types depending on the nature of the learning target or the feedback available to the learning system:
Supervised learning: The computer is presented with a given set of inputs and their respective outputs. The goal of the program is to learn from the inputs in order to reproduce the outputs.
Unsupervised learning: There is no target variable in the case of unsupervised learning. The computer is left on its own to find patterns within the data.
Reinforcement learning: A program has to interact with its environment in a dynamic manner, such as a driving a car.
As described earlier, a supervised learning algorithm studies the training data and generates a function, which can be used for predicting new instances.
As you can see from the preceding diagram, there is training data, which the machine learning model will learn from.
Let's assume that the training data is a set of text that represents...