评估分类器——精确率与召回率

Throughout this course we have evaluated classifiers in one key way.We measured error or the accuracy of that classifier.

上次课程中,我们通过测量误差或准确度这一个关键的方式对分类器进行了评估。

But it turns out that for many real world applications, error or accuracy is not great measure to try to understand whether classifier is doing the right thing for you.

但是事实证明,对于现实世界的很多情况来说,误差或准确度并不是很好的方式来试图理解分类器做的事情对不对。

And in this module, we're going to talk about precision recall, which is a really cool, very simple way to evaluate classifiers that captures something that's needed for a wide range of applications.

在这篇文章中,我们将讨论精确度和召回率,这是一个很棒也很简单的方式来评估反应广泛应用所需求的分类器

And we'll use a cool, fun application as a kind of running example throughout the module. 

这里我们将用一个很酷很有趣的应用作为实例演示。

So here's the idea. Let's say I have a restaurant and I have a goal. I want to increase the number of guests, the number of people, coming to my restaurant by 30%.

这里有个想法:假设我开了一家餐厅,我有一个目标,使来我餐厅的客人数量增加30%。

 And I say, I'm going to do a cool advertising campaign to do that. But nobody wants to just get those ads in the mail or spam email as their advertising campaign. 

我说我想搞一个很酷的广告活动来达到这一目的。但是没有人再想让你的广告被人从垃圾邮件列表里面得知这一老套的宣传方式吧。

So I want to be innovative, I want to be authentic about my advertising campaign.

所以我们得来点创新,让我们的广告变得可信。

 And the way that I want to be authentic is that when I use the voice of my customers to talk about how great the restaurant is.

而这里我想要的方式是使用我顾客的声音来反应我的餐厅有多棒!

 So when I'm looking at customer reviews, and then I find great things in there, great nuggets, to be able to tell everyone about how great my restaurant is.

因为当我在看客人们的评价时,我发现了惊喜的东西,它们能够告诉大家我的餐厅是多么美好!

So I want to find great quotes, key positive sentences that describe amazing things about my restaurant. 

所以我想找出那么能描述我餐厅精彩的关键积极性评价。

And may even find some spokespeople that are really eloquent, they explain really well what they love about my restaurant.

要是可能的话,我甚至想从中找到一些口才很好的顾客当餐厅代言人,因为他们完美解释了有多爱我的餐厅。

So that's my goal. And so, I might do that automatically by taking the restaurant reviews and posting key sentences or key things that people are saying on my website. 

这就是我的目标。并且我希望能够自动收集顾客们的评价然后把其中对餐厅的关键评论发布到我的网站上,

So that anybody who lands there can see the latest greatest of what's being said.

所以当有人登陆我的网站时就能看到那些最新最棒的评价。

 So I want to do a lot of these restaurant reviews, and I want to automate a lot of that process. 

因此我想使用那些餐厅评价数据并且能够自动处理这个过程。

So I want to do it. So just like we described in the first course in this specialization, we're going to take the restaurant reviews, and we're going to split them into sentences.

有了这个想法之后,就跟我们在这个系列课程第一课中描述的那样,我们准备采集餐厅评价数据,然后把它们分割成句子。

 So for every sentence, some are positive about my restaurant, some are negative, I want to be able to evaluate. 

对于其中的每一句话,会有一些对我餐厅是积极正面的,也会有一些是负面的,我希望能够对这些数据进行评估。

评估分类器——精确率与召回率_第1张图片

So for example, if the sentence says, easily the best sushi in Seattle, that's my input xi. 

例如,如果有句话说:差不多是西雅图最好的寿司。把这句话当作我的系统输入数据Xi。

And when I feed that for the sentence sentiment classifier and get an output y hat I which is either positive sentiment or negative sentiment. 

当我为我的句子情感分类器输入Xi后,能够得到正面情绪或负面情绪的输出yi。

And I want to do that for every sentence in every review that I get.

我想要为我收集的评论中的每一个句子做这个分类。

 And, in fact, I might even do that in real time. Every time a new review comes in, I'm going to feed it through this classifier model, and start to predict y hat i has been positive for some sentences.

实际上或许可以实时做这个过程,每当一个新的评论过来,就把它输入进分类模型中,然后预测出了对某些句子yi是积极的。

 These are the great ones, the ones I want to show off, the ones I want to talk about. And then y hat i -1, this is the negative ones, I want to ignore those. 

这些好的句子是我想要展示和宣传的。当yi-1是不那么好的时候,那我可不想把这些话展示在我的网站上面。

So I only care about the positive ones, and I'm going to do my best to take those positive sentences, show them in a way that people really feel, man, my restaurant is awesome.I'm going to go there for sushi.

所以我只需要关心积极正面的句子,并且尽全力获取它们,通过宣传这些让大家真正感觉到:这家餐厅棒极了,我要去那吃寿司!

So how do I find those positive sentences? I am going to do a sentiment classifier. How do I know the sentiment classifier is really good, I can trust it, I can put those sentences on my website without having to check every time a sentence goes up? This is the key point. 

那么如何找到这些积极的句子? 我需要做一个情感分类器。我如何知道情感分类器很好,让我可以相信它并放心地把这些句子放在我的网站上,而不必每次检查一下? 这就是关键点了。

We are talking about automating machine learning. You have to really trust the machine learning model. 

这就是我们谈论的机器学习自动化,因此要使用你就必须相信机器学习模型。

So if I give you a particular, say, accuracy, is that enough trust for me to just automatically feed reviews into something that shows up in my website?

所以如果我给你一个特别的标准(比如精确度),这是否能让我足够相信那些宣传在我的网站上面的,由自动机产生的内容吗?

你可能感兴趣的:(评估分类器——精确率与召回率)