Professional Documents
Culture Documents
Machine Learning
Machine Learning
Regression is a statistical method used in finance, investing, and other disciplines that attempts to
determine the strength and character of the relationship between one dependent variable (usually
denoted by Y) and a series of other variables (known as independent variables).
Regression helps investment and financial managers to value assets and understand the
relationships between variables, such as product prices and the stocks of businesses dealing in
those commodities.
Types of Regression
The two basic types of regression are simple linear regression and multiple linear regression,
although there are non-linear regression methods for more complicated data and analysis. Simple
linear regression uses one independent variable to explain or predict the outcome of the
dependent variable Y, while multiple linear regression uses two or more independent variables to
predict the outcome.
Differentiate the 2 types of Supervised Learning methods:-
Regression Classification
Regression is used to Classification is used to predict which
predict continuous values. class a data point is part of (discrete value)
Both regression and classification are supervised learning problems where there is an input, X,
an output, Y, and the task is to learn the mapping from the input to the output. The approach in
machine learning is that we assume a model defined up to a set of parameters:
y = g(x|θ) , where g(·) is the model and θ are its parameters. Y is a number in regression and is a
class code (e.g., 0/1) in the case of classification.
Unsupervised learning
In supervised learning, the aim is to learn a mapping from the input to an output whose correct
values are provided by a supervisor. In unsupervised learning, there is no such supervisor and we
only have input data.
Unsupervised learning is a type of machine learning in which models are
trained using unlabeled dataset and are allowed to act on that data
without any supervision.
● Unsupervised learning is helpful for finding useful insights from the data.
● Unsupervised learning is much similar as a human learns to think by their own
experiences, which makes it closer to the real AI.
● Unsupervised learning works on unlabeled and uncategorized data which make
unsupervised learning more important.
● In real-world, we do not always have input data with the corresponding output so to solve
such cases, we need unsupervised learning.
Here, we have taken an unlabeled input data, which means it is not categorized and
corresponding outputs are also not given. Now, this unlabeled input data is fed to the machine
learning model in order to train it. Firstly, it will interpret the raw data to find the hidden patterns
from the data and then will apply suitable algorithms such as k-means clustering, Decision tree,
etc.Once it applies the suitable algorithm, the algorithm divides the data objects into groups
according to the similarities and differences between the objects.
The aim is to find the regularities in the input. There is a structure to the input space such that
certain patterns occur more often than others, and we want to see what generally happens and
what does not. In statistics, this is called density estimation. Example - Clustering
● Clustering: Clustering is a method of grouping the objects into clusters such that objects
with most similarities remains into a group and has less or no similarities with the objects
of another group. Cluster analysis finds the commonalities between the data objects and
categorizes them as per the presence and absence of those commonalities.
● Association: An association rule is an unsupervised learning method which is used for
finding the relationships between variables in the large database. It determines the set of
items that occurs together in the dataset. Association rule makes marketing strategy more
effective. Such as people who buy X item (suppose a bread) are also tend to purchase Y
(Butter/Jam) item. A typical example of Association rule is Market Basket Analysis.
● Clustering is the task of dividing the population or data points into a number of groups such
that data points in the same groups are more similar to other data points in the same group than
those in other groups. In simple words, the aim is to segregate groups with similar traits and
assign them into clusters.
● Clustering has a large no. of applications spread across various domains. Some of the
most popular applications of clustering are:
1. Recommendation engines
2. Market segmentation
3. Social network analysis
4. Search result grouping
5. Medical imaging
6. Image segmentation
7. Anomaly detection
2. It is called supervised learning because the 2. These are called unsupervised learning
process of an algorithm learning from the because unlike supervised learning above
training dataset can be thought of as a teacher there are no correct answers and there is no
supervising the learning process. We know the teacher. Algorithms are left to their own
correct answers, the algorithm iteratively devices to discover and present the interesting
makes predictions on the training data and is structure in the data.
corrected by the teacher. Learning stops when
the algorithm achieves an acceptable level of
performance.
4.Supervised learning model produces an 4.Unsupervised learning model may give less
accurate result. accurate result as compared to supervised
learning.
5.Supervised learning model predicts the 5.Unsupervised learning model finds the
output. hidden patterns in data.
Reinforcement Learning
In some applications, the output of the system is a sequence of actions. In such a case, a single
action is not important; what is important is the policy that is the sequence of correct actions to
reach the goal. In the Reinforcement learning scenario there is a decision maker, called the
agent, that is placed in an environment. At any time, the environment is in a certain state .The
decision
maker has a set of actions possible. Once an action is chosen and taken, the state changes. The
solution to the task requires a sequence of actions, and we get feedback, in the form of a reward.
The learning agent learns the best sequence of actions to solve a problem where “best” is
quantified as the sequence of actions that has the maximum cumulative reward. Such is the
setting of reinforcement learning.
In Reinforcement Learning, the agent learns automatically using feedback without any labeled
data, unlike supervised learning.Since there is no labeled data, the agent is bound to learn by its
experience only.
RL solves a specific type of problem where decision making is sequential, and the goal is
long-term, such as game-playing, robotics, etc.
The agent interacts with the environment and explores it by itself. The primary goal of an agent
in reinforcement learning is to improve the performance by getting the maximum positive
rewards.
The agent learns with the process of hit and trial, and based on the experience, it learns to
perform the task in a better way. Hence, we can say that "Reinforcement learning is a type of
machine learning method where an intelligent agent (computer program) interacts with the
environment and learns to act within that." How a Robotic dog learns the movement of his
arms is an example of Reinforcement learning.
It is a core part of AI and all AI agents work on the concept of reinforcement learning. Here we
do not need to pre-program the agent, as it learns from its own experience without any human
intervention.
Example: Suppose there is an AI agent present within a maze environment, and his goal is to
find the diamond. The agent interacts with the environment by performing some actions, and
based on those actions, the state of the agent gets changed, and it also receives a reward or
penalty as feedback.
The mathematical framework for defining a solution in reinforcement learning scenario is called
Markov Decision Process. This can be designed as:
● Set of states, S
● Set of actions, A
● Reward function, R
● Policy, π
● Value, V
We have to take an action (A) to transition from our start state to our end state (S). In return
getting rewards (R) for each action we take. Our actions can lead to a positive reward or negative
reward. The set of actions we took define our policy (π) and the rewards we get in return defines
our value (V). Our task here is to maximize our rewards by choosing the correct policy.
A good example is game playing where a single move by itself is not that important; it is
the sequence of right moves that is good. A move is good if it is part of a good game playing
policy.
A robot navigating in an environment in search of a goal location is another application area
of reinforcement learning. At any time, the robot can move in one of a number of directions.
After a number of trial runs, it should learn the correct sequence of actions to reach the goal state
from an initial state, doing this as quickly as possible and without hitting any of the obstacles.
Other examples include