1.6 Machine Learning Overview | Unsupervised learning part 1 --[Machine Learning | Andrew Ng]
 After supervised learning, the most widely used form of machine learning is unsupervised learning. Let's take a look at what that means. We've talked about supervised learning, and this video is about unsupervised learning. But don't let the name unsupervised fool you. Unsupervised learning is, I think, just as super as supervised learning. When we're looking at supervised learning in the last video, recall that it looks something like this. In the case of a classification problem, each example was associated with an output label Y such as benign or malignant, designated by the O's and crosses. In unsupervised learning, we're given data that isn't associated with any output labels Y. Say you're given data on patients and their tumor size and the patient's age, but not whether the tumor was benign or malignant. So the data set looks like this on the right. We're not asked to diagnose whether the tumor is benign or malignant because we're not given any labels Y in the data set. Instead, our job is to find some structure or some pattern or just find something interesting in the data. This is unsupervised learning. We call it unsupervised because we're not trying to supervise the algorithm to give some quote right answer for every input. Instead, we ask the algorithm to figure out all by itself what's interesting or what patterns or structures there might be in this data. With this particular data set, an unsupervised learning algorithm might decide that the data can be assigned to two different groups or two different clusters. And so it might decide that there's one cluster or group over here and there's another cluster or group over here. This is a particular type of unsupervised learning called a clustering algorithm because it places the unlabeled data into different clusters. And this turns out to be used in many applications. For example, clustering is used in Google News. What Google News does is every day it goes and looks at hundreds of thousands of news articles on the internet and groups related stories together. For example, here's a sample from Google News where the headline of the top article is Giant Panda Gives Birth to Rare Twin Cubs at Japan's Older Zoo. This article actually caught my eye because my daughter loves pandas and so there are a lot of stuffed panda toys and watching of panda videos in my house. And looking at this, you might notice that below this are other related articles. Maybe from the headlines alone, you can start to guess what clustering might be doing. Notice that the word panda appears here, here, here, here, and here. And notice that the word twin also appears in all five articles. And the word zoo also appears in all of these articles. So the clustering algorithm is finding articles out of all the hundreds of thousands of news articles on the internet that day, finding the articles that mention similar words and grouping them into clusters. Now what's cool is that this clustering algorithm figures out on its own which words suggest that certain articles are in the same group. What I mean is there isn't an employee at Google News who's telling the algorithm to find articles of the word panda and twins and zoo to put them into the same cluster. The news topics change every day and there are so many news stories it just isn't feasible to have people doing this every single day for all the topics the news covers. Instead, the algorithm has to figure out on its own without supervision what are the clusters of news articles today. So that's why this clustering algorithm is a type of unsupervised learning algorithm. Let's look at a second example of unsupervised learning applied to clustering genetic or DNA data. This image shows a picture of DNA microarray data. These look like tiny grids of a spreadsheet and each tiny column represents the genetic or DNA activity of one person. So for example, this entire column here is from one person's DNA and this other column is of another person. Each row represents a particular gene. So just as an example, perhaps this row here might represent a gene that affects eye color or this row here is a gene that affects how tall someone is. Researchers have even found a genetic link to whether someone dislikes certain vegetables such as broccoli or Brussels sprouts or asparagus. So next time someone asks you, why didn't you finish a salad? You can tell them, oh, maybe it's genetic. For DNA microarrays, the idea is to measure how much certain genes are expressed for each individual person. So these colors, red, green, gray, and so on, show the degree to which different individuals do or do not have a specific gene active. And what you can do is then run a clustering algorithm to group individuals into different categories or different types of people. Like maybe these individuals are grouped together and let's just call this type one. And these people are grouped into type two and these people are grouped as type three. This is unsupervised learning because we're not telling the algorithm in advance that there is a type one person with certain characteristics or a type two person with certain characteristics. Instead, what we're saying is, here's a bunch of data. I don't know what the different types of people are, but can you automatically find structure into data and automatically figure out what are the major types of individuals? Since we're not giving the algorithm the right answer for the examples in advance, this is unsupervised learning. Here's a third example. Many companies have huge databases of customer information. Given this data, can you automatically group your customers into different market segments so that you can more efficiently serve your customers? Concretely, the deeplearning.ai team did some research to better understand the deeplearning.ai community and why different individuals take these classes, subscribe to the batch weekly newsletter or attend our PyLAI events. Let's visualize the deeplearning.ai community as this collection of people. Running clustering, that is market segmentation, found a few distinct groups of individuals. One group's primary motivation is seeking knowledge to grow their skills. Perhaps this is you. And if so, that's great. A second group's primary motivation is looking for a way to develop their career. Maybe you want to get a promotion or a new job or make some career progression. If this strives you, that's great too. And yet another group wants to stay updated on how AI impacts their field of work. Perhaps this is you. That's great too. This is the clustering that our team use to try to better serve our community as we're trying to figure out what are the major categories of learners in the deeplearning.ai community. So if any of these is your top motivation for learning, that's great. And I hope I'll be able to help you on your journey. Or in case this is you and you want something totally different than the other three categories, that's fine too. And I want you to know I love you all the same. So to summarize, a clustering algorithm, which is a type of unsophisticated learning algorithm, takes data without labels and tries to automatically group them into clusters. And so maybe the next time you see or think of a panda, maybe you'll think of clustering as well. And besides clustering, there are other types of unsophisticated learning as well. Let's go on to the next video to take a look at some other types of unsophisticated learning algorithms.
[{"start": 0.0, "end": 7.5200000000000005, "text": " After supervised learning, the most widely used form of machine learning is unsupervised"}, {"start": 7.5200000000000005, "end": 8.52, "text": " learning."}, {"start": 8.52, "end": 11.36, "text": " Let's take a look at what that means."}, {"start": 11.36, "end": 16.88, "text": " We've talked about supervised learning, and this video is about unsupervised learning."}, {"start": 16.88, "end": 20.16, "text": " But don't let the name unsupervised fool you."}, {"start": 20.16, "end": 25.2, "text": " Unsupervised learning is, I think, just as super as supervised learning."}, {"start": 25.2, "end": 29.46, "text": " When we're looking at supervised learning in the last video, recall that it looks something"}, {"start": 29.46, "end": 30.5, "text": " like this."}, {"start": 30.5, "end": 35.36, "text": " In the case of a classification problem, each example was associated with an output label"}, {"start": 35.36, "end": 41.8, "text": " Y such as benign or malignant, designated by the O's and crosses."}, {"start": 41.8, "end": 48.72, "text": " In unsupervised learning, we're given data that isn't associated with any output labels"}, {"start": 48.72, "end": 55.8, "text": " Y. Say you're given data on patients and their tumor size and the patient's age, but not"}, {"start": 55.8, "end": 59.44, "text": " whether the tumor was benign or malignant."}, {"start": 59.44, "end": 63.559999999999995, "text": " So the data set looks like this on the right."}, {"start": 63.559999999999995, "end": 71.12, "text": " We're not asked to diagnose whether the tumor is benign or malignant because we're not given"}, {"start": 71.12, "end": 73.44, "text": " any labels Y in the data set."}, {"start": 73.44, "end": 79.8, "text": " Instead, our job is to find some structure or some pattern or just find something interesting"}, {"start": 79.8, "end": 81.17999999999999, "text": " in the data."}, {"start": 81.17999999999999, "end": 83.6, "text": " This is unsupervised learning."}, {"start": 83.6, "end": 88.46, "text": " We call it unsupervised because we're not trying to supervise the algorithm to give"}, {"start": 88.46, "end": 91.96, "text": " some quote right answer for every input."}, {"start": 91.96, "end": 98.39999999999999, "text": " Instead, we ask the algorithm to figure out all by itself what's interesting or what patterns"}, {"start": 98.39999999999999, "end": 102.28, "text": " or structures there might be in this data."}, {"start": 102.28, "end": 107.36, "text": " With this particular data set, an unsupervised learning algorithm might decide that the data"}, {"start": 107.36, "end": 112.3, "text": " can be assigned to two different groups or two different clusters."}, {"start": 112.3, "end": 120.64, "text": " And so it might decide that there's one cluster or group over here and there's another cluster"}, {"start": 120.64, "end": 123.53999999999999, "text": " or group over here."}, {"start": 123.53999999999999, "end": 129.04, "text": " This is a particular type of unsupervised learning called a clustering algorithm because"}, {"start": 129.04, "end": 133.84, "text": " it places the unlabeled data into different clusters."}, {"start": 133.84, "end": 137.48, "text": " And this turns out to be used in many applications."}, {"start": 137.48, "end": 142.84, "text": " For example, clustering is used in Google News."}, {"start": 142.84, "end": 147.72, "text": " What Google News does is every day it goes and looks at hundreds of thousands of news"}, {"start": 147.72, "end": 152.14, "text": " articles on the internet and groups related stories together."}, {"start": 152.14, "end": 158.04, "text": " For example, here's a sample from Google News where the headline of the top article is Giant"}, {"start": 158.04, "end": 162.22, "text": " Panda Gives Birth to Rare Twin Cubs at Japan's Older Zoo."}, {"start": 162.22, "end": 167.23999999999998, "text": " This article actually caught my eye because my daughter loves pandas and so there are"}, {"start": 167.24, "end": 172.08, "text": " a lot of stuffed panda toys and watching of panda videos in my house."}, {"start": 172.08, "end": 180.04000000000002, "text": " And looking at this, you might notice that below this are other related articles."}, {"start": 180.04000000000002, "end": 186.24, "text": " Maybe from the headlines alone, you can start to guess what clustering might be doing."}, {"start": 186.24, "end": 194.70000000000002, "text": " Notice that the word panda appears here, here, here, here, and here."}, {"start": 194.7, "end": 201.95999999999998, "text": " And notice that the word twin also appears in all five articles."}, {"start": 201.95999999999998, "end": 206.33999999999997, "text": " And the word zoo also appears in all of these articles."}, {"start": 206.33999999999997, "end": 211.28, "text": " So the clustering algorithm is finding articles out of all the hundreds of thousands of news"}, {"start": 211.28, "end": 217.0, "text": " articles on the internet that day, finding the articles that mention similar words and"}, {"start": 217.0, "end": 219.64, "text": " grouping them into clusters."}, {"start": 219.64, "end": 225.32, "text": " Now what's cool is that this clustering algorithm figures out on its own which words suggest"}, {"start": 225.32, "end": 227.88, "text": " that certain articles are in the same group."}, {"start": 227.88, "end": 232.32, "text": " What I mean is there isn't an employee at Google News who's telling the algorithm to"}, {"start": 232.32, "end": 238.04, "text": " find articles of the word panda and twins and zoo to put them into the same cluster."}, {"start": 238.04, "end": 243.56, "text": " The news topics change every day and there are so many news stories it just isn't feasible"}, {"start": 243.56, "end": 249.2, "text": " to have people doing this every single day for all the topics the news covers."}, {"start": 249.2, "end": 255.67999999999998, "text": " Instead, the algorithm has to figure out on its own without supervision what are the clusters"}, {"start": 255.67999999999998, "end": 258.03999999999996, "text": " of news articles today."}, {"start": 258.03999999999996, "end": 264.15999999999997, "text": " So that's why this clustering algorithm is a type of unsupervised learning algorithm."}, {"start": 264.15999999999997, "end": 269.32, "text": " Let's look at a second example of unsupervised learning applied to clustering genetic or"}, {"start": 269.32, "end": 272.0, "text": " DNA data."}, {"start": 272.0, "end": 276.44, "text": " This image shows a picture of DNA microarray data."}, {"start": 276.44, "end": 282.08, "text": " These look like tiny grids of a spreadsheet and each tiny column represents the genetic"}, {"start": 282.08, "end": 285.76, "text": " or DNA activity of one person."}, {"start": 285.76, "end": 292.26, "text": " So for example, this entire column here is from one person's DNA and this other column"}, {"start": 292.26, "end": 294.96, "text": " is of another person."}, {"start": 294.96, "end": 298.3, "text": " Each row represents a particular gene."}, {"start": 298.3, "end": 304.4, "text": " So just as an example, perhaps this row here might represent a gene that affects eye color"}, {"start": 304.4, "end": 310.44, "text": " or this row here is a gene that affects how tall someone is."}, {"start": 310.44, "end": 314.79999999999995, "text": " Researchers have even found a genetic link to whether someone dislikes certain vegetables"}, {"start": 314.79999999999995, "end": 319.35999999999996, "text": " such as broccoli or Brussels sprouts or asparagus."}, {"start": 319.35999999999996, "end": 322.44, "text": " So next time someone asks you, why didn't you finish a salad?"}, {"start": 322.44, "end": 326.08, "text": " You can tell them, oh, maybe it's genetic."}, {"start": 326.08, "end": 332.4, "text": " For DNA microarrays, the idea is to measure how much certain genes are expressed for each"}, {"start": 332.4, "end": 334.12, "text": " individual person."}, {"start": 334.12, "end": 340.08, "text": " So these colors, red, green, gray, and so on, show the degree to which different individuals"}, {"start": 340.08, "end": 344.88, "text": " do or do not have a specific gene active."}, {"start": 344.88, "end": 351.28000000000003, "text": " And what you can do is then run a clustering algorithm to group individuals into different"}, {"start": 351.28000000000003, "end": 354.5, "text": " categories or different types of people."}, {"start": 354.5, "end": 360.28000000000003, "text": " Like maybe these individuals are grouped together and let's just call this type one."}, {"start": 360.28, "end": 369.4, "text": " And these people are grouped into type two and these people are grouped as type three."}, {"start": 369.4, "end": 373.84, "text": " This is unsupervised learning because we're not telling the algorithm in advance that"}, {"start": 373.84, "end": 378.79999999999995, "text": " there is a type one person with certain characteristics or a type two person with certain characteristics."}, {"start": 378.79999999999995, "end": 382.4, "text": " Instead, what we're saying is, here's a bunch of data."}, {"start": 382.4, "end": 387.28, "text": " I don't know what the different types of people are, but can you automatically find structure"}, {"start": 387.28, "end": 392.32, "text": " into data and automatically figure out what are the major types of individuals?"}, {"start": 392.32, "end": 397.32, "text": " Since we're not giving the algorithm the right answer for the examples in advance, this is"}, {"start": 397.32, "end": 398.79999999999995, "text": " unsupervised learning."}, {"start": 398.79999999999995, "end": 401.76, "text": " Here's a third example."}, {"start": 401.76, "end": 406.59999999999997, "text": " Many companies have huge databases of customer information."}, {"start": 406.59999999999997, "end": 412.11999999999995, "text": " Given this data, can you automatically group your customers into different market segments"}, {"start": 412.11999999999995, "end": 416.03999999999996, "text": " so that you can more efficiently serve your customers?"}, {"start": 416.04, "end": 421.84000000000003, "text": " Concretely, the deeplearning.ai team did some research to better understand the deeplearning.ai"}, {"start": 421.84000000000003, "end": 427.68, "text": " community and why different individuals take these classes, subscribe to the batch weekly"}, {"start": 427.68, "end": 432.08000000000004, "text": " newsletter or attend our PyLAI events."}, {"start": 432.08000000000004, "end": 437.72, "text": " Let's visualize the deeplearning.ai community as this collection of people."}, {"start": 437.72, "end": 445.52000000000004, "text": " Running clustering, that is market segmentation, found a few distinct groups of individuals."}, {"start": 445.52, "end": 450.91999999999996, "text": " One group's primary motivation is seeking knowledge to grow their skills."}, {"start": 450.91999999999996, "end": 451.91999999999996, "text": " Perhaps this is you."}, {"start": 451.91999999999996, "end": 453.64, "text": " And if so, that's great."}, {"start": 453.64, "end": 458.47999999999996, "text": " A second group's primary motivation is looking for a way to develop their career."}, {"start": 458.47999999999996, "end": 462.53999999999996, "text": " Maybe you want to get a promotion or a new job or make some career progression."}, {"start": 462.53999999999996, "end": 465.62, "text": " If this strives you, that's great too."}, {"start": 465.62, "end": 471.5, "text": " And yet another group wants to stay updated on how AI impacts their field of work."}, {"start": 471.5, "end": 473.2, "text": " Perhaps this is you."}, {"start": 473.2, "end": 474.64, "text": " That's great too."}, {"start": 474.64, "end": 480.24, "text": " This is the clustering that our team use to try to better serve our community as we're"}, {"start": 480.24, "end": 486.94, "text": " trying to figure out what are the major categories of learners in the deeplearning.ai community."}, {"start": 486.94, "end": 490.47999999999996, "text": " So if any of these is your top motivation for learning, that's great."}, {"start": 490.47999999999996, "end": 493.84, "text": " And I hope I'll be able to help you on your journey."}, {"start": 493.84, "end": 500.0, "text": " Or in case this is you and you want something totally different than the other three categories,"}, {"start": 500.0, "end": 501.0, "text": " that's fine too."}, {"start": 501.0, "end": 504.58, "text": " And I want you to know I love you all the same."}, {"start": 504.58, "end": 509.76, "text": " So to summarize, a clustering algorithm, which is a type of unsophisticated learning algorithm,"}, {"start": 509.76, "end": 515.64, "text": " takes data without labels and tries to automatically group them into clusters."}, {"start": 515.64, "end": 521.12, "text": " And so maybe the next time you see or think of a panda, maybe you'll think of clustering"}, {"start": 521.12, "end": 522.68, "text": " as well."}, {"start": 522.68, "end": 527.48, "text": " And besides clustering, there are other types of unsophisticated learning as well."}, {"start": 527.48, "end": 531.56, "text": " Let's go on to the next video to take a look at some other types of unsophisticated learning"}, {"start": 531.56, "end": 535.1999999999999, "text": " algorithms."}]