Friday, 9 February 2018

Note 1: Machine learning categories 

1. Supervised learning
2. Unsupervised learning
3. Reinforcement learning

1. What is Supervised learning?
We have data set (labeled training data or training examples). Each element of data set is a pair of an input object and a desired output value. A supervised learning algorithm analyzes the data set and produces a function, which can be used for predicting new data set. Let 's see 2 examples:
- The first example is predicting housing prices. We have data set and each element of data set is a pair of area of the house in square feet and its price. We plot this data set on a graph. The horizontal axis represents the size of house in square feet while the vertical axis represents the price of the house in. The learning algorithm will try to produce a function that can go through this data set. This function may be a straight line (pink line) or a quadratic function (blue line). With the pink line if the input is 750f2, the output will be predicted as 150k$. But with the blue line the output will be 200k.
Figure: supervised learning - regression
- The second example is predicting whether a patient get a breast cancer as malignant or benign. Each element of data set is a pair of input is tumor size and output is yes (a breast cancer is malignant) and no (a breast cancer is benign). This is also a classification problem where the learning algorithm try to classify the output is yes or no (maybe more states than 2).
Figure: supervised learning - classification
- Supervised learning problems are categorized into "regression" and "classification" problems. In a regression problem, we are trying to predict results using a continuous function (continuous values). In a classification problem, we are instead trying to predict results using a discrete function (discrete values such as yes or no).
Figure: The supervised learning process
2. What is Unsupervised learning?
A unsupervised learning algorithm analyzes the data set (unlabeled training data) and produces a function to describe some structures in data set. We take Google News as example of using unsupervised learning. Go to that website, you will see that the categories locate at the left side and the news (from many websites) relates to the category locate at the middle. How can the news of many websites be grouped together? Every day, Googlebot will go through other News websites, reads news and use unsupervised learning to find the structure of the news and group the news that has similar structure together (cohesive news). (And then using supervised learning to classify these news to categories)
3. Reinforcement learning
Reinforcement learning is the problem of getting an agent to act in the environment so as to maximize cumulative reward.

For example, consider teaching a dog to fetch a ball: you cannot tell it what to do, but you can reward it by increasing the food if it finishes the task and punish it by reducing the food if it not finish the task. The dog has to figure out what it did that made it get the reward/punishment.
We can use a similar method to train computers. Some practical applications of reinforcement learning to machine are playing chess, scheduling jobs, and controlling robot.