Week 1 Lecture 3 - Unsupervised Learning

Machine Learning- Balaraman Ravindran
4 Aug 202108:52

Summary

TLDRThis module introduces unsupervised learning, contrasting it with supervised learning by highlighting the lack of labeled data. It focuses on clustering, where the goal is to identify groups of related data points and detect outliers. The script also covers association rule mining, which involves finding frequent patterns and conditional dependencies in data, with applications in market basket analysis and social network analysis. The importance of understanding data without predefined labels for various practical applications is emphasized.

Takeaways

  • šŸ“š Unsupervised learning is about handling data without labels, unlike supervised learning which uses labeled training data.
  • šŸ” The primary goal of unsupervised learning is clustering, which involves finding groups of data points that are closely related in the input space.
  • šŸ¤– Bias in clustering is often assumed in the form of the shape of clusters, such as ellipsoids, which can influence how data is grouped.
  • šŸ‘€ Outliers are data points that do not fit into any cluster and are considered anomalies in the dataset.
  • šŸ›ļø Clustering can be applied to customer data to discover different types of customers, enabling targeted marketing strategies.
  • šŸ–¼ļø Image clustering can help in segmenting different regions of an image, such as distinguishing clouds, sand, and sea in a beach scene.
  • šŸ“ Association rule mining is a method to find frequent patterns and conditional dependencies in data, which can be used for making predictions or understanding relationships.
  • šŸ›’ Market Basket analysis is a common application of association rule mining, where it identifies frequently bought items together to inform sales strategies.
  • šŸ”¢ The process of association rule mining typically involves two stages: finding frequent patterns and then deriving rules from these patterns.
  • šŸ“ˆ Time Series analysis and fault analysis are other applications where association rules can help identify sequences of events or causes of faults.
  • šŸ”‘ Terminology in association rule mining includes 'item set', which refers to a set or subset of items that are bought together in transactions.

Q & A

  • What is the primary difference between supervised and unsupervised learning?

    -Supervised learning involves training data with labels, whereas unsupervised learning deals with data without any labels, and the goal is to find patterns or groupings within the data.

  • What is the main objective of clustering in unsupervised learning?

    -The main objective of clustering is to find groups of coherent or cohesive data points in the input space, essentially discovering inherent structures in the data.

  • What is an example of bias in the context of clustering?

    -An example of bias in clustering is the assumption about the shape of clusters. The script mentions an assumption that clusters are ellipsoids, which influences how they are represented.

  • What are outliers in the context of clustering?

    -Outliers are data points that do not fall into any of the identified clusters, often considered as points that are far away from other points in the dataset and do not conform to the patterns.

  • Can you provide an example of how clustering can be applied in customer data?

    -Clustering can be applied to customer data to discover different classes of customers, allowing for targeted promotions and marketing strategies based on the similarities among customers.

  • How can clustering be used in image processing?

    -In image processing, clustering can be used to segment different regions of an image, such as distinguishing clouds, sand, and sea in a beach scene, which helps in making sense of the image content.

  • What is Association rule mining and how does it differ from other machine learning problems?

    -Association rule mining is a process of finding frequent patterns and conditional dependencies in data. It differs from other machine learning problems as it originated as a mining problem rather than a learning problem and focuses on pattern relationships rather than prediction.

  • What is the significance of Market Basket data in Association rule mining?

    -Market Basket data is significant in Association rule mining as it represents transactions where items are bought together. Analyzing this data can reveal frequent patterns of item purchases, which can be used to create association rules and understand customer buying behavior.

  • What are the two stages of the Association rule mining process?

    -The two stages of the Association rule mining process are: 1) Finding all frequent patterns or item sets in the data, and 2) Deriving association rules from these frequent patterns, identifying conditional dependencies among them.

  • How can the results of Association rule mining be applied in different settings?

    -The results of Association rule mining can be applied in various settings such as predicting co-occurrence of events, analyzing market basket data for retail recommendations, time series analysis for identifying triggers for certain events, and social network analysis for understanding interactions among entities.

  • What is the importance of understanding the terminology used in Association rule mining?

    -Understanding the terminology used in Association rule mining, such as 'item set' and 'frequent item sets', is important as it helps in accurately identifying and interpreting the patterns and rules derived from the data, which is crucial for making informed decisions.

Outlines

00:00

šŸ“š Introduction to Unsupervised Learning

This paragraph introduces the concept of unsupervised learning, contrasting it with supervised learning where data comes labeled. The focus is on clustering, which aims to identify groups of similar data points without predefined labels. The speaker discusses the bias in assuming cluster shapes, typically ellipsoids, and the identification of outliersā€”data points that do not fit into any cluster. The paragraph also touches on the variety of clustering methods and their applications, such as customer segmentation for targeted marketing, image segmentation to identify distinct regions in a picture, and document clustering to discover topics in a collection. The speaker also introduces the concept of association rule mining, which involves finding frequent patterns and conditional dependencies in data, with a brief mention of its applications in market basket analysis and other areas.

05:04

šŸ” Association Rule Mining and Its Applications

The second paragraph delves into the specifics of association rule mining, which is about discovering frequent patterns and the conditional relationships between them in datasets. The process is broken down into two stages: first, identifying frequent patterns or item sets, and second, deriving association rules from these patterns. The paragraph provides examples such as customer behavior in a store, where the frequent co-occurrence of certain customers can lead to insights about their shopping habits. It also mentions other applications, including time series analysis for event triggers, fault analysis by identifying sequences leading to faults, and social network analysis to find common interactions. The paragraph concludes with a brief explanation of terminology used in association rule mining, such as 'item set' and the concept of deriving rules from frequent item sets.

Mindmap

Keywords

šŸ’”Unsupervised Learning

Unsupervised Learning is a type of machine learning where the algorithm is trained on data without labeled responses. It's used to explore data and discover patterns or structures within it. In the video, it's the main theme, contrasting with supervised learning where data comes with labels. The script discusses how unsupervised learning can be applied to clustering and association rule mining without predefined classes or outcomes.

šŸ’”Clustering

Clustering is a method within unsupervised learning where the goal is to group a set of objects in such a way that objects in the same group are more similar to each other than to those in other groups. The script uses clustering as an example of finding 'coherent or cohesive data points' and identifies it as a way to discover natural groupings in data, such as grouping customers or image pixels.

šŸ’”Coherent Data Points

Coherent data points refer to elements within a dataset that are closely related or share similar characteristics, making them suitable to be grouped together in a cluster. The script mentions this concept while explaining the objective of clustering, where the data points form natural groups that are distinct from one another.

šŸ’”Ellipsoids

In the context of the script, ellipsoids represent a geometric assumption about the shape of clusters. The speaker mentions having a bias towards ellipsoid shapes when identifying clusters, implying that the algorithm assumes clusters to be ellipsoidal in form, which influences how data points are grouped.

šŸ’”Outliers

Outliers are data points that do not fit well into any cluster and are significantly different from other observations. The script discusses outliers in the context of clustering, noting that not all data points need to fall into clusters, and some may be distant from the rest, thus considered outliers.

šŸ’”Association Rule Mining

Association Rule Mining is a technique used to discover interesting associations or correlations between variables in large databases. The script introduces this concept as a form of 'mining' that involves finding frequent patterns and conditional dependencies among these patterns, such as in market basket analysis.

šŸ’”Frequent Patterns

Frequent patterns are events or items that occur together in a dataset more often than would be expected by chance. The script discusses the importance of identifying these patterns in association rule mining, where they form the basis for deriving rules like 'if A happens, then B is likely to happen'.

šŸ’”Conditional Dependencies

Conditional dependencies refer to the relationships between different items or events where the presence of one item or event implies the presence of another. The script uses the example of customers A and B visiting a shop together to illustrate how these dependencies can be used to make predictions or inferences about customer behavior.

šŸ’”Market Basket Analysis

Market Basket Analysis is a specific application of association rule mining that involves analyzing customer purchases to find associations between different products. The script mentions this as a way to understand what items are frequently bought together, which can help in creating targeted promotions or understanding customer behavior.

šŸ’”Data Mining

Data Mining is the process of extracting useful information from large sets of data. The script briefly touches on data mining, noting that many tasks labeled as data mining are essentially machine learning problems. It also distinguishes 'mining' from 'learning' in the context of association rules.

šŸ’”Item Sets

In the context of association rule mining, item sets refer to groups of items that are purchased together. The script mentions that finding 'frequent item sets' is the first step in association rule mining, which then allows for the derivation of rules based on these sets.

Highlights

Introduction to unsupervised learning, contrasting with supervised learning which uses labeled data.

Unsupervised learning involves handling data without any labels attached.

Clustering is a key problem in unsupervised learning, aiming to find groups of coherent data points.

Example of identifying potential clusters in a dataset with different shapes.

Assumption of ellipsoid shapes for clusters based on bias in unsupervised learning.

Outliers are data points that do not fall into any clusters, identified as a result of the ellipsoid assumption.

Clustering aims to find cohesive groups and outliers that do not conform to input patterns.

Numerous methods exist for accomplishing clustering, which will be explored in the course.

Applications of clustering include discovering classes of customers from customer data.

Clustering can enable targeted promotions based on customer groupings without predefined labels.

Image clustering can segment different regions in an image, aiding in understanding the scene.

Word usage clustering can discover synonyms, while document clustering can identify similar topics.

Association rule mining involves finding frequent patterns and conditional dependencies in data.

Association rules can predict co-occurrences, like customers visiting a shop together.

The process of association rule mining includes two stages: finding frequent patterns and deriving associations.

Market Basket data is a popular example for association rule mining, analyzing items bought together.

Frequent item sets are the basis for deriving association rules in transaction data.

Association rule mining has applications in predicting event co-occurrences, market basket analysis, and time series analysis.

Terminology in association rule mining includes item sets and the implications between them.

The module concludes with an overview of unsupervised learning applications and methods.

Transcripts

play00:10

Hello and welcome to this module on introductionĀ  to unsupervised learning, right. So in supervisedĀ Ā 

play00:21

learning we looked at how you will handleĀ  training data that had labels on it.

play00:26

So this is this particular place thisĀ  is a classification data set whereĀ Ā 

play00:30

red denotes one class and blueĀ  denotes the other class right.

play00:33

And in unsupervised learning right so youĀ  basically have a lot of data that is givenĀ Ā 

play00:41

to you but they do not have any labelsĀ  attached to them right. So we look atĀ Ā 

play00:46

first at the problem of clustering where yourĀ  goal is to find groups of coherent or cohesiveĀ Ā 

play00:54

data points in this input space right soĀ  here is an example of possible clusters.

play00:58

So those set of data points could form a clusterĀ  right and again now those set of data points couldĀ Ā 

play01:04

form a cluster and again those and those. So thereĀ  are like four clusters that we have identified inĀ Ā 

play01:12

this in this setup. So one thing to note hereĀ  is that even in something like clustering soĀ Ā 

play01:20

I need to have some form of a bias right so inĀ  this case the bias that I am having is in theĀ Ā 

play01:26

shape of the cluster so I am assuming that theĀ  clusters are all ellipsoids right and thereforeĀ Ā 

play01:31

you know I have been drawing a specificĀ  shape curves for representing the clusters.

play01:39

And also note that not all data points need toĀ  fall into clusters and there are a couple ofĀ Ā 

play01:46

points there that do not fall into any of theĀ  clusters this is primarily a artifact of meĀ Ā 

play01:52

assuming that they are ellipsoids but stillĀ  there are points in the center is actuallyĀ Ā 

play01:58

faraway from all the other points in the in theĀ  data set to be considered as what are known asĀ Ā 

play02:06

outliers. So when you do clustering so there areĀ  two things so one is you are interested in findingĀ Ā 

play02:11

cohesive groups of points and the second is youĀ  are also interested in finding data points thatĀ Ā 

play02:16

do not conform to the patterns in the inputĀ  and these are known as outliers all right.

play02:22

And there are many many different ways in whichĀ  you can accomplish clustering and we will lookĀ Ā 

play02:27

at a few in the course. And the applications areĀ  numerous right so here are a few representativeĀ Ā 

play02:34

ones. So one thing is to look at customer dataĀ  right and try to discover classes of customers.Ā Ā 

play02:42

So earlier we looked at in the supervised learningĀ  case we looked at is that a customer will buy aĀ Ā 

play02:47

computer or will not buy a computer. As opposed toĀ  that we could just take all the customer data thatĀ Ā 

play02:52

you have and try to just group them into differentĀ  kinds of customers who come to your shop and thenĀ Ā 

play02:58

you could do some kind of targeted promotionsĀ  and different classes of customers right.

play03:03

And this need not necessarily come with labelsĀ  you know I am not going to tell you that okayĀ Ā 

play03:09

this customer is class 1 that customerĀ  is class 2 you are just going to findĀ Ā 

play03:12

out which of the customers are more similarĀ  with each other all right. And as the secondĀ Ā 

play03:18

application which we have illustrated here isĀ  that I could do clustering on image pixels soĀ Ā 

play03:24

that you could discover different regionsĀ  in the image and then you could do someĀ Ā 

play03:28

segmentation based on that different regionĀ  so for example here it have a picture of aĀ Ā 

play03:35

beach scene and then you are able to figureĀ  out the clouds and the sand and the sea andĀ Ā 

play03:40

the tree from the image. So that allows youĀ  to make more sense out of the image right.

play03:46

Or you could do clustering on word usages rightĀ  and you could discover synonyms and you couldĀ Ā 

play03:53

also do clustering on documents right andĀ  depending on which kind of documents areĀ Ā 

play04:00

similar to each other; if I give youĀ  a collection of say 100,000 documentsĀ Ā 

play04:06

I might be able to figure out what areĀ  the different topics that are discussedĀ Ā 

play04:09

in this collection of documents and manyĀ  many ways in which you can use clustering.

play04:15

Rule mining: I should give you a side aboutĀ  the usage of the word mining here so many ofĀ Ā 

play04:23

you might have heard of the term data miningĀ  and more often than not the purported dataĀ Ā 

play04:31

mining tasks are essentially machine learningĀ  problems right so it could be classificationĀ Ā 

play04:35

regression and so on so forth. And the firstĀ  problem that was essentially introduced as aĀ Ā 

play04:41

mining problem and not as a learning problemĀ  was the one of mining frequent patterns andĀ Ā 

play04:46

associations. And that is one of the reasonsĀ  I call this Association rule mining as opposedĀ Ā 

play04:51

to Association rule learning just to keepĀ  the historic connection intact right. SoĀ Ā 

play04:57

in Association rule mining we are interested inĀ  finding frequent patterns that occur in the inputĀ Ā 

play05:04

data and then we are looking at conditionalĀ  dependencies among these patterns right.

play05:10

So for example if A and B occur togetherĀ  often right then I could say something likeĀ Ā 

play05:15

if A happens then B will happen let us supposeĀ  that so you have customers that are coming toĀ Ā 

play05:23

your shop and whenever customer A visits yourĀ  shop custom B also tags along with him right,Ā Ā 

play05:31

so the next time you find customaryĀ  A somewhere in the shop so you canĀ Ā 

play05:35

know that customer B is alreadyĀ  there in the shop along with A.

play05:38

Or with very high confidence you couldĀ  say that B is also in the shop at someĀ Ā 

play05:42

somewhere else may be not with A. ButĀ  somewhere else in the shop all right,Ā Ā 

play05:46

so these are the kinds of rules that weĀ  are looking at Association rules which areĀ Ā 

play05:50

conditional dependencies ā€“ if A has come thenĀ  B is also there right and so the AssociationĀ Ā 

play05:57

rule mining process usually goes in two stages soĀ  the first thing is we find all frequent patterns.

play06:04

So A happens often so A is a customer that comesĀ  to my store often. And then I find that A andĀ Ā 

play06:11

B are pairs of customers that come to my storeĀ  often. So if I once I have that right A comes toĀ Ā 

play06:16

my store often and A and B comes to my store oftenĀ  then I can derive associations from these kinds ofĀ Ā 

play06:21

frequent patterns. And also you could do this inĀ  the variety of different settings you could findĀ Ā 

play06:27

sequences in time series data right and whereĀ  you could look at triggers for certain events.

play06:33

Or you could look at fault analysis right byĀ  looking at a sequence of events that happenedĀ Ā 

play06:40

and you can figure out which event occurs moreĀ  often with a fault right or you could look atĀ Ā 

play06:45

transactions data which is the most popularĀ  example given here is what is called MarketĀ Ā 

play06:51

Basket data. So you go to a shop and youĀ  buy a bunch of things together and you putĀ Ā 

play06:55

them in your basket; so what is there in yourĀ  basket right so this forms the transaction soĀ Ā 

play07:01

you buy say eggs, milk and bread and soĀ  all of this go together in your basket.

play07:06

And then you can find out what are theĀ  frequently occurring patterns in thisĀ Ā 

play07:11

purchase data and then you can make rules out ofĀ  those or you could look at finding patterns andĀ Ā 

play07:17

graphs that is typically used in social networkĀ  analysis so which kind of interactions amongĀ Ā 

play07:22

entities happen often right so that is anotherĀ  question that is what we looking at right.

play07:31

So the most popular thing here is miningĀ  transactions so the most popular applicationĀ Ā 

play07:38

here is mining transactions. And as I mentionedĀ  earlier transaction is a collection of itemsĀ Ā 

play07:42

that are bought together right and so hereĀ  is a little bit of terminology. A set or aĀ Ā 

play07:49

subset of items is often called an item setĀ  in the Association rule mining communityĀ Ā 

play07:55

and so the first step that you have toĀ  do is find frequent item sets right.

play08:00

And you can conclude that item set A, ifĀ  it is frequent implies item set B if bothĀ Ā 

play08:08

A and A union B or frequent item setsĀ  right so A and B are subset so A unionĀ Ā 

play08:14

B is another subset so if both A andĀ  A union B are frequent item sets thenĀ Ā 

play08:19

you can say that item set A implies itemĀ  set B right. Like I mentioned earlier soĀ Ā 

play08:25

there are many applications here so you couldĀ  think of predicting co-occurrence of events.

play08:30

And Market Basket analysis and Time SeriesĀ  analysis like I mentioned earlier you couldĀ Ā 

play08:35

think of trigger events or causes ofĀ  Faults and so on so forth right so thisĀ Ā 

play08:43

brings us to the end of this moduleĀ  introducing unsupervised learning.

Rate This
ā˜…
ā˜…
ā˜…
ā˜…
ā˜…

5.0 / 5 (0 votes)

Related Tags
Unsupervised LearningData ClusteringAssociation RulesMachine LearningCustomer SegmentationImage SegmentationDocument AnalysisPattern RecognitionMarket BasketFrequent Patterns