Machine Learning
Three Types
1- Supervised :- Learning from the know label data to create a model then predicting target class for the given input data
2- Unsupervised :- Learning from the unlabeled data to differentiating the given input data.
3- Re-Enforcement learning :- Reinforcement learning differs from the supervised learning in a way that in supervised learning the training data has the answer key with it so the model is trained with the correct answer itself whereas in reinforcement learning, there is no answer but the reinforcement agent decides what to do to perform the given task. In the absence of training data-set, it is bound to learn from its experience.
Supervised and unsupervised learning with a real-life example
- Suppose you had a basket and filled it with different kinds of fruits.
- Your task is to arrange them into groups.
- For understanding let me explain the names of the fruits in our basket.
- We have four types of fruits. They are
APPLE
BANANA
GRAPE
CHERRIES
Supervised Learning:
- You already learn from your previous work about the physical characters of fruits
- So arranging the same type of fruits at one place is easy now
- In data mining terminology the earlier work is called as training the data
- You already learn the things from your train data. This is because of response variable
- Response variable means just a decision variable
- You can observe response variable below (FRUIT NAME)
No.
SIZE
COLOR
SHAPE
FRUIT NAME
1
Big
Red
Rounded shape with depression at the top
Apple
2
Small
Red
Heart-shaped to nearly globular
Cherry
3
Big
Green
Long curving cylinder
Banana
4
Small
Green
Round to oval,Bunch shape Cylindrical
Grape
- Suppose you have taken a new fruit from the basket then you will see the size, color, and shape of that particular fruit.
- If size is Big, color is Red, the shape is rounded shape with a depression at the top, you will confirm the fruit name as apple and you will put in apple group.
- Likewise for other fruits also.
- The job of grouping fruits was done and the happy ending.
- You can observe in the table that a column was labeled as “FRUIT NAME“. This is called as a response variable.
- If you learn the thing before from training data and then applying that knowledge to the test data(for new fruit), This type of learning is called as Supervised Learning.
Supervised Learning Algorithms:
All classification and regression algorithms come under supervised learning.
- Logistic Regression
- Decision trees
- Support vector machine (SVM)
- k-Nearest Neighbors
- Naive Bayes
- Random forest
- Linear regression
- polynomial regression
- SVM for regression
Unsupervised Learning:
- Suppose you have a basket and it is filled with some different types of fruits and your task is to arrange them as groups.
- This time, you don’t know anything about the fruits, honestly saying this is the first time you have seen them. You have no clue about those.
- So, how will you arrange them?
- What will you do first???
- You will take a fruit and you will arrange them by considering the physical character of that particular fruit.
- Suppose you have considered color.
- Then you will arrange them on considering base condition as color.
- Then the groups will be something like this.
- RED COLOR GROUP: apples & cherry fruits.
- GREEN COLOR GROUP: bananas & grapes.
- So now you will take another physical character such as size.
- RED COLOR AND BIG SIZE: apple.
- RED COLOR AND SMALL SIZE: cherry fruits.
- GREEN COLOR AND BIG SIZE: bananas.
- GREEN COLOR AND SMALL SIZE: grapes.
- The job has done, the happy ending.
- Here you did not learn anything before ,means no train data and no response variable.
- In data mining or machine learning, this kind of learning is known as unsupervised learning.
Unsupervised learning algorithms:
All clustering algorithms come under unsupervised learning algorithms.
- K – means clustering
- Hierarchical clustering
- Hidden Markov models
Reinforcement Learning (RL), known as a semi-supervised learning model in machine learning, is a technique to allow an agent to take actions and interact with an environment so as to maximize the total rewards. RL is usually modeled as a Markov Decision Process (MDP).
·
· Imagine a baby is given a TV remote control at your home (environment). In simple terms, the baby (agent) will first observe and construct his/her own representation of the environment (state). Then the curious baby will take certain actions like hitting the remote control (action) and observe how would the TV response (next state). As a non-responding TV is dull, the baby dislike it (receiving a negative reward) and will take less actions that will lead to such a result(updating the policy) and vice versa. The baby will repeat the process until he/she finds a policy (what to do under different circumstances) that he/she is happy with (maximizing the total (discounted) rewards).
· The study of RL is to construct a mathematical framework to solve the problems. For example, to find a good policy we could use valued-based methods like Q-learning to measure how good an action is in a particular state or policy-based methods to directly find out what actions to take under different states without knowing how good the actions are.
· However, the problems we face in the real world can be extremely complicated in many different ways and therefore a typical RL algorithm has no clue to solve. For example, the state space is very large in the game of GO, environment cannot be fully observed in Poker game and there are lots of agents interact with each other in the real world. Researchers have invented methods to solve some of the problems by using deep neural network to model the desired policies, value functions or even the transition models, which therefore is called Deep Reinforcement Learning. This article makes no distinction between RL and Deep RL.