Chapter 3 ML
Chapter 3 ML
Unsupervised learning
• In this type of Machine Learning, the model is not fed with labeled
data
• Consider the following figure, the model has no clue about the image
‘which image is Tom and which is Jerry’, it figures out patterns and
the differences between Tom and Jerry on its own by taking in tons of
data.
• Clustering: This type of problem involves assigning the input into two or more
clusters based on feature similarity.
For example, clustering viewers into similar groups based on their interests, age,
geography, etc. can be done by using Unsupervised Learning algorithms like K-
Means Clustering.
For example, people that buy a new home most likely to buy new furniture.
Recommender system
Misganu T. Itroduction to Machine Learning 4
K-means Algorithm
• which groups the unlabelled 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 allows us to cluster the data into different groups and a convenient way to discover the
categories of groups in the unlabelled dataset on its own without the need for any
supervising.
• The algorithm takes the unlabelled dataset as input, divides the dataset into k-number of
clusters, and repeats the process until it does not find the best clusters. The value of k
big task.
Elbow Method:
• The Elbow method is one of the most popular ways to find the optimal number
of clusters. This method uses the concept of WCSS value.
• WCSS stands for Within Cluster Sum of Squares, which defines the total
variations within a cluster.
• The formula to calculate the value of WCSS (for 3 clusters) is given below:
WCSS= ∑Pi in Cluster1 distance(Pi C1)2 +∑Pi in Cluster2distance(Pi C2)2+∑Pi in CLuster3 distance(Pi C3)2
• Since the graph shows the sharp bend, which looks like an
elbow, hence it is known as the elbow method.
• The graph for the elbow method looks like the below
image:
• Frequent itemsets are those items whose support is greater than the
threshold value or user-specified minimum support.
o It means if A & B are the frequent itemsets together, then
individually A and B should also be the frequent itemset.
o Now we will create the L3 table. As we can see from the above C3 table,
there is only one combination of itemset that has support count equal to the
minimum support count.
o So, the L3 will have only one combination, i.e., {A, B, C}.
• That is, each example x is given as a pair (x1; x2). We assume that each view in itself is
sufficient for correct classification.
• Specifically, let D be a distribution over X, and let C1 and C2 be concept classes defined
over X1 and X2, respectively.
• What we assume is that all labels on examples with non-zero probability under D are
consistent with some target function f1 € C1, and are also consistent with some target
function f2 € C2.
• In other words, if f denotes the combined target concept over the entire example, then for
any example x = (x1; x2) observed with label l., we have f (x) = f1(x1) = f2(x2) = l.
• This means in particular that D assigns probability zero to any example (x1; x2) such
that f1(x1) ≠ f2(x2).
Misganu T. Itroduction to Machine Learning 23
Q-Learning Algorithm
2. Stuart Russell and Peter Norvig – Artificial Intelligence A Modern Approach (4th
Edition)