Uploaded by SWAPNA GUPTA

ml unit 1 part 5

advertisement
Introduction to Machine Learning Approaches (Cont..)
2. Clustering
Dr. Ankita jaiswal
Introduction to Machine Learning Approaches (Cont..)
Clustering
Dr. Ankita jaiswal
Introduction to Machine Learning Approaches (Cont..)
-Clustering
Cluster formation Method:
• 1. Density-Based Methods: These methods consider the clusters as the dense region
having some similarities and differences from the lower dense region of the space. These
methods have good accuracy and the ability to merge two clusters. Example DBSCAN
(Density-Based Spatial Clustering of Applications with Noise), OPTICS (Ordering Points to
Identify Clustering Structure), etc.
• 2. Hierarchical Based Methods: The clusters formed in this method form a tree-type
structure based on the hierarchy. New clusters are formed using the previously formed
one. It is divided into two category
• Agglomerative (bottom-up approach)
• Divisive (top-down approach)
Examples: CURE (Clustering Using Representatives), BIRCH (Balanced Iterative Reducing Clustering and
using Hierarchies), etc.
Dr. Ankita jaiswal
Introduction to Machine Learning Approaches (Cont..)
-Clustering
• 3. Partitioning Methods: These methods partition the objects into k
clusters and each partition forms one cluster. This method is used to
optimize an objective criterion similarity function such as when the distance
is a major parameter.
• Example: K-means, CLARANS (Clustering Large Applications based upon
Randomized Search), etc.
• 4. Grid-based Methods: In this method, the data space is formulated into a
finite number of cells that form a grid-like structure. All the clustering
operations done on these grids are fast and independent of the number of
data objects.
• Example- STING (Statistical Information Grid), wave cluster, CLIQUE
(CLustering In Quest), etc.
Dr. Ankita jaiswal
Introduction to Machine Learning Approaches (Cont..)
Clustering
Density based cluster
Grid Clustering
Dr. Ankita jaiswal
Introduction to Machine Learning Approaches (Cont..)
-Clustering
Dr. Ankita jaiswal
o The silhouette plot displays a measure of how close each point in one cluster is to
points in the neighboring clusters and thus provides a way to assess parameters
like number of clusters visually.
o The value of the silhouette coefficient is between [-1, 1]. A score of 1 denotes the
best meaning that the data point is very compact within the cluster to which
it belongs and far away from the other clusters. The worst value is -1. Values
near 0 denote overlapping clusters
Dr. Ankita jaiswal
Introduction to Machine Learning Approaches (Cont..)
-Clustering
• Following are the most important clustering algorithms in ML
1. K Means Clustering:
• K-Means Clustering is an Unsupervised Learning algorithm which groups the
unlabeled dataset into different clusters. Here K defines the number of pre-defined
clusters that need to be created in the process, as if K=2, there will be two clusters,
and for K=3, there will be three clusters, and so on.
• It is an iterative algorithm that divides the unlabeled dataset into k different clusters
in such a way that each dataset belongs only one group that has similar properties.
• It is a centroid-based algorithm, where each cluster is associated with a centroid.
The main aim of this algorithm is to minimize the sum of distances between the data
point and their corresponding clusters.
Dr. Ankita jaiswal
• 2. Mean Shift Clustering:
• It is another powerful clustering algorithm used in unsupervised learning.
Unlike K-means clustering, it does not make any assumptions hence it is a
non-parametric algorithm.
• Mean-shift algorithm basically assigns the datapoints to the clusters
iteratively by shifting points towards the highest density of datapoints i.e.
cluster centroid.
• The difference between K-Means algorithm and Mean-Shift is that later
one does not need to specify the number of clusters in advance because
the number of clusters will be determined by the algorithm w.r.t data.
• 3. Hierarchical Clustering
• •It is another unsupervised learning algorithm that is used to group
together the unlabeled data points having similar characteristics.
Dr. Ankita jaiswal
Introduction to Machine Learning Approaches (Cont..)
-Clustering
• Applications of Clustering in different fields :
• Marketing: It can be used to characterize & discover customer segments for
marketing purposes.
• Biology: It can be used for classification among different species of plants and
animals.
• Libraries: It is used in clustering different books on the basis of topics and
information.
• Insurance: It is used to acknowledge the customers, their policies and identifying
the frauds.
• City Planning: It is used to make groups of houses and to study their values based
on their geographical locations and other factors present
• Earthquake studies: By learning the earthquake-affected areas we can determine
the dangerous zones
Dr. Ankita jaiswal
Introduction to Machine Learning Approaches (Cont..)
3. Reinforcement Learning
 Reinforcement Learning is a feedback-based Machine learning technique in which an agent learns to
behave in an environment by performing the actions and seeing the results of actions. For each good
action, the agent gets positive feedback, and for each bad action, the agent gets negative feedback or
penalty.
 In Reinforcement Learning, the agent learns automatically using feedbacks without any labeled data,
unlike supervised learning.
 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.
 Thus, Reinforcement Learning(RL) is a type of machine learning technique that enables an agent to learn
in an interactive environment by trial and error using feedback from its own actions and experiences
 It is a core part of Artificial intelligence, and all AI agent works on the concept of reinforcement
learning.
Dr. Ankita jaiswal
Introduction to Machine Learning Approaches (Cont..)
- Reinforcement Learning
 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 agent continues doing these three things (take action, change
state/remain in the same state, and get feedback), and by doing these
actions, he learns and explores the environment.
• The agent learns that what actions lead to positive feedback or rewards
and what actions lead to negative feedback penalty. As a positive reward,
the agent gets a positive point, and as a penalty, it gets a negative point.
Dr. Ankita jaiswal
Dr. Ankita jaiswal
Dr. Ankita jaiswal
Introduction to Machine Learning Approaches (Cont..)
- Reinforcement Learning
Dr. Ankita jaiswal
Introduction to Machine Learning Approaches (Cont..)
- Reinforcement Learning
Dr. Ankita jaiswal
• Key Features of Reinforcement Learning
• In RL, the agent is not instructed about the environment and what
actions need to be taken.
• It is based on the hit and trial process.
• The agent takes the next action and changes states according to the
feedback of the previous action.
• The agent may get a delayed reward.
• The environment is stochastic (uncertain or random), and the agent
needs to explore it to reach to get the maximum positive rewards.
Dr. Ankita jaiswal
Introduction to Machine Learning Approaches (Cont..)
- Reinforcement Learning
Dr. Ankita jaiswal
• Terms used in Reinforcement Learning
• Agent(): An entity that can perceive/explore the environment and act upon it.
• Environment(): A situation in which an agent is present or surrounded by. In
RL, we assume the stochastic environment, which means it is random in
nature.
• Action(): Actions are the moves taken by an agent within the environment.
• State(): State is a situation returned by the environment after each action
taken by the agent.
• Reward(): A feedback returned to the agent from the environment to
evaluate the action of the agent.
• Policy(): Policy is a strategy applied by the agent for the next action based on
the current state.
• Value(): It is expected long-term retuned with the discount factor and
opposite to the short-term reward.
• Q-value(): It is mostly similar to the value, but it takes one additional
parameter as a current action (a).
Dr. Ankita jaiswal
RL vs SL
Dr. Ankita jaiswal
Application of RL
Dr. Ankita jaiswal
Application of RL (Cont..)
 Robotics: RL is used in Robot navigation, Robo-soccer, walking, juggling, etc.
 Control: RL can be used for adaptive control such as Factory processes, admission control in
telecommunication, and Helicopter pilot is an example of reinforcement learning.
 Game Playing: RL can be used in Game playing such as tic-tac-toe, chess, etc.
 Chemistry: RL can be used for optimizing the chemical reactions.
 Business: RL is now used for business strategy planning.
 Manufacturing: In various automobile manufacturing companies, the robots use deep reinforcement
learning to pick goods and put them in some containers.
 Finance Sector: The RL is currently used in the finance sector for evaluating trading strategies.
Dr. Ankita jaiswal
Introduction to Machine Learning Approaches (Cont..)
4. Decision Tree
Dr. Ankita jaiswal
Introduction to Machine Learning Approaches (Cont..)
-Decision Tree
• Thus, it is a method for approximating discrete target function, in which the
learned function is represented by a decision tree.
• Set of IF-THEN rules are used to improve human readability.
• It is an example of Inductive inference algorithm.
Dr. Ankita jaiswal
Introduction to Machine Learning Approaches (Cont..)
-Decision Tree
Dr. Ankita jaiswal
Introduction to Machine Learning Approaches (Cont..)
-Decision Tree
Dr. Ankita jaiswal
Introduction to Machine Learning Approaches (Cont..)
-Decision Tree
Dr. Ankita jaiswal
Introduction to Machine Learning Approaches (Cont..)
-Decision Tree
Dr. Ankita jaiswal
Introduction to Machine Learning Approaches (Cont..)
-Decision Tree
Dr. Ankita jaiswal
Introduction to Machine Learning Approaches (Cont..)
-Decision Tree
Dr. Ankita jaiswal
Introduction to Machine Learning Approaches (Cont..)
-Decision Tree
Decision for Accepting a Job Offer
Dr. Ankita jaiswal
Download