-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用 What-If 工具来研究机器学习模型 #5933
使用 What-If 工具来研究机器学习模型 #5933
Conversation
标题改为 使用 What-If 工具来研究机器学习模型 |
校对认领 |
@lsvih 好的呢 🍺 |
@@ -5,181 +5,181 @@ | |||
> * 译者: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
增加译者信息
|
||
## What-If Tool(WIT) | ||
## What-If 工具(WIT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改中文括号
|
||
*** | ||
|
||
The tool can be accessed through TensorBoard or as an extension in a Jupyter or [Colab](https://colab.research.google.com/github/tensorflow/tensorboard/blob/master/tensorboard/plugins/interactive_inference/What_If_Tool_Notebook_Usage.ipynb) notebook. | ||
可以通过 TensorBoard 使用该工具,或者使用 Jupyter 或 [Colab](https://colab.research.google.com/github/tensorflow/tensorboard/blob/master/tensorboard/plugins/interactive_inference/What_If_Tool_Notebook_Usage.ipynb) 笔记本使用。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以通过 TensorBoard 使用该工具,或者使用 Jupyter 或 [Colab](https://colab.research.google.com/github/tensorflow/tensorboard/blob/master/tensorboard/plugins/interactive_inference/What_If_Tool_Notebook_Usage.ipynb) 笔记本使用。 | |
可以通过 TensorBoard 使用该工具,也可以将其作为 Jupyter 或 [Colab](https://colab.research.google.com/github/tensorflow/tensorboard/blob/master/tensorboard/plugins/interactive_inference/What_If_Tool_Notebook_Usage.ipynb) 笔记本的拓展使用。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lsvih 此处我觉得 notebook 是不是不翻译比较好,因为 jupyter notebook 一般都是连用,而且在与 colab 连用时,也很少翻译 notebook。您可以和译者考虑一下。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我觉得全部保留 notebook 比较合适
|
||
WIT can be used inside a [Jupyter](https://jupyter.org/) or [Colab](https://colab.research.google.com/) notebook, or inside the [TensorBoard](https://www.tensorflow.org/tensorboard) web application. This has been nicely and clearly explained in the [documentation](https://github.com/tensorflow/tensorboard/tree/master/tensorboard/plugins/interactive_inference#what-if-tool) and I highly encourage you to go through that since explaining the entire process wouldn’t be possible through this short article. | ||
WIT 可以在 [Jupyter](https://jupyter.org/) 或 [Colab](https://colab.research.google.com/) 笔记本中使用,也可以在 [TensorBoard](https://www.tensorflow.org/tensorboard) 应用程序中使用。在[文档](https://github.com/tensorflow/tensorboard/tree/master/tensorboard/plugins/interactive_inference#what-if-tool)中已经对此进行了细致了的说明,我强烈建议你通过这篇短文来解释整个过程。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我强烈建议你通过这篇短文来解释整个过程。
->
我强烈建议你去阅读他们的文档,因为这篇短文很难解释清楚整个过程。
|
||
### Using WIT with Tensorboard | ||
### Tensorboard 结合 WIT 使用 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### Tensorboard 结合 WIT 使用 | |
### 结合 Tensorboard 使用 WIT |
|
||
![](https://cdn-images-1.medium.com/max/2000/1*5FmxAvQhvgNASSwoco5NlA.png) | ||
|
||
![Native Country DIstribution || Sex distribution](https://cdn-images-1.medium.com/max/2000/1*_V4de4Q2lJAEnMWKI-maOQ.png) | ||
|
||
*** | ||
|
||
Similarly, most datapoints belong to the United States while females are not well represented in the dataset. Since the data is biased, it is but natural that its predictions are targeted towards one group only. Afterall a model learns from the data it is provided and if the source is skewed so will be the results. Machine learning has proved its mettle in a lot of applications and areas. However, one of the key hurdles for industrial applications of machine learning models is to determine whether the raw input data used to train the model contains discriminatory bias or not. | ||
同样,大部分数据点来源于美国,而女性在数据集中没有很好的表现。因为数据有偏差,其预测只针对一个群体是很自然的。毕竟,模型从所提供的数据中学习,如果源存在偏差,那么结果一定也是这样的。机器学习已经在许多应用和领域证明了它的价值。然而,机器学习模型工业应用的一个关键障碍是确定用于训练模型的原始输入数据是否含有歧视性的偏差。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果源存在偏差,那么结果一定也是这样的
->
如果数据源存在偏差,那么结果一定也会有同样的偏差
|
||
*** | ||
|
||
This was just a quick run-through of some of the what if tools features. WIT is a pretty handy tool which gives the ability to probe the models, into the hands of the people to whom it matters the most. Simply creating and training a model isn’t the purpose of Machine Learning but understanding why and how that model was created is Machine Learning in true sense. | ||
这只是对一些 what-if 工具特性的快速运行。WIT 是一个非常方便的工具,它提供了探测模型的能力,在最重要的人的手中。简单的创建和培训模型并不是机器学习的目的,但理解为什么创建该模型是真正意义上的“机器学习”。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
快速运行 -> 简单预览
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
它提供了探测模型的能力,在最重要的人的手中
->
它为决策者提供了探索模型的能力
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
简单的创建和培训模型并不是机器学习的目的
->
简单的创建和训练模型并不是机器学习的目的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
但理解为什么创建该模型是真正意义上的“机器学习”
->
理解为何创建一个模型才是真正意义上的“机器学习”
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
但理解为什么创建该模型是真正意义上的“机器学习”
->
理解为何创建一个模型才是真正意义上的“机器学习”
理解为何以及如何创建一个模型才是真正意义上的“机器学习”
|
||
We can see that the model is more accurate on females than males. Also, the model predicts high income for females much less than it does for males (9.3% of the time for females vs 28.6% of the time for males). One probable reason might be due to the under-representation of females in the dataset which we shall explore in the next section. | ||
可以看到该模型对女性的预测比对男性更准确。此外,该模型预测,女性的高收入远低于男性(女性为 9.3%,男性为 28.6%)。一个可能的原因是由于女性在数据集中的代表性不足,因为我们会在下一节中继续深究。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
因为我们会在下一节中继续深究 -> 我们会在下一节中继续深究这个问题
|
||
Additionally, the tool can optimally set the decision threshold for the two subsets while taking into account any of a number of constraints related to algorithmic fairness such as demographic parity or equal opportunity. | ||
此外,此工具可以最优化两个子集间设置的决策阀值,同时考虑与算法公平性相关的诸多约束中的任何一个比如人口统计或机会均等。 | ||
|
||
### 3. Features Tab |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### 3. Features Tab | |
### 3. 特征选项卡 |
|
||
One can also organize the data points in tons of different ways including confusion matrices, scatter plots, histograms and small multiples of plots by simply selecting the fields from the drop-down menu. A few examples have been presented below. | ||
人们还可以通过从下拉菜单中选择字段,以各种不同的方式来组织数据点,包括混淆矩阵、散点图、直方图和小倍数。以下是列举的几个例子。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
最后句号改冒号
@Starriers 校对完成 |
@Starriers 可以修改下哈 |
@Starriers 麻烦尽快修改 |
校对认领 |
@TrWestdoor 妥妥哒 🍻 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感谢译者,翻译的不错,部分地方可能是对 machine learning 不太熟悉导致不够准确。
|
||
In this era of explainable and interpretable Machine Learning, one merely cannot be content with simply training the model and obtaining predictions from it. To be able to really make an impact and obtain good results, we should also be able to probe and investigate our models. Apart from that, algorithmic fairness constraints and bias should also be clearly kept in mind before going ahead with the model. | ||
在这个可解释和可解释机器学习的时代,人们不能仅仅满足于简单地训练模型并从中获得预测。为了能够真正产生影响和取得良好的效果,我们还应该能够探索和研究我们的模型。除此之外,在进行该模型之前,还应该清楚地记住算法的公平性约束和偏差。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在这个可解释和可解释机器学习的时代,人们不能仅仅满足于简单地训练模型并从中获得预测。为了能够真正产生影响和取得良好的效果,我们还应该能够探索和研究我们的模型。除此之外,在进行该模型之前,还应该清楚地记住算法的公平性约束和偏差。 | |
在这个可解释机器学习的时代,人们不能仅仅满足于简单地训练模型并从中获得预测。为了能够真正产生影响和取得良好的效果,我们还应该能够探索和研究我们的模型。除此之外,在进行该模型之前,还应该清楚地记住算法的公平性约束和偏差。 |
群里面讨论过这个问题,我也查了一下,没有统一的翻译可以参考,所以我觉得可以翻译成一个可解释性就可以了,两个不符合中文习惯。
|
||
*** | ||
|
||
Investigating a model requires asking a lot of questions and one needs to have an acumen of a detective to probe and look for issues and inconsistencies within the models. Also, such a task is usually complex requiring to write a lot of custom code. Fortunately, the **What-If Tool** has been created to address this issue making it easier for a broad set of people to examine, evaluate, and debug ML systems easily and accurately. | ||
研究一个模型需要了解问题,当事者需要有侦探般的智慧去探索和寻找模型中的问题和不一致性。而且,这样的任务通常都很复杂,需要编写大量的自定义代码。幸运的是,**What-If Tool** 为我们解决了这个问题,它使用户更容易、更准确地检查、评估和调试机器学习系统。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
研究一个模型需要了解问题,当事者需要有侦探般的智慧去探索和寻找模型中的问题和不一致性。而且,这样的任务通常都很复杂,需要编写大量的自定义代码。幸运的是,**What-If Tool** 为我们解决了这个问题,它使用户更容易、更准确地检查、评估和调试机器学习系统。 | |
研究一个模型需要探索很多问题,当事者需要有侦探般的智慧去探索和寻找模型中的问题和不一致性。而且,这样的任务通常都很复杂,需要编写大量的自定义代码。幸运的是,**What-If Tool** 为我们解决了这个问题,它使用户更容易、更准确地检查、评估和调试机器学习系统。 |
|
||
[**What-If Tool**](https://pair-code.github.io/what-if-tool) is an interactive visual tool that is designed to investigate the Machine Learning models. Abbreviated as WIT, it enables the understanding of a Classification or Regression model by enabling people to examine, evaluate, and compare machine learning models. Due to its user-friendly interface and less dependency on complex coding, everyone from a developer, a product manager, a researcher or a student can use it for their purpose. | ||
[**What-If**](https://pair-code.github.io/what-if-tool) 是一种用于研究机器学习模型的交互式视觉工具。缩写为 WIT,它使人们能够通过检查、评估和比较机器学习模型来理解分类或回归模型。由于它的用户友好界面和对复杂编码的依赖程度较低,开发者、产品经理、研究人员或者学生都可以通过使用它来达到目的。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[**What-If**](https://pair-code.github.io/what-if-tool) 是一种用于研究机器学习模型的交互式视觉工具。缩写为 WIT,它使人们能够通过检查、评估和比较机器学习模型来理解分类或回归模型。由于它的用户友好界面和对复杂编码的依赖程度较低,开发者、产品经理、研究人员或者学生都可以通过使用它来达到目的。 | |
[**What-If 工具**](https://pair-code.github.io/what-if-tool) 是一种用于研究机器学习模型的交互式视觉工具。缩写为 WIT,它使人们能够通过检查、评估和比较机器学习模型来理解分类或回归模型。由于它的用户友好界面和对复杂编码的依赖程度较低,开发者、产品经理、研究人员或者学生都可以通过使用它来达到目的。 |
|
||
**WIT** is an open-source visualisation tool released by Google under the **[PAIR](https://ai.google/research/teams/brain/pair)(People + AI Research)** initiative. PAIR brings together researchers across [Google](https://ai.google/) to study and redesign the ways people interact with AI systems. | ||
**WIT** 是 Google 发布的一个开源可视化工具,叫做 **[PAIR](https://ai.google/research/teams/brain/pair)(人 + AI 搜索)**。PAIR 通过 [Google](https://ai.google/),将研究人员聚齐,研究并重新设计了人与 AI 系统的交互方式。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**WIT** 是 Google 发布的一个开源可视化工具,叫做 **[PAIR](https://ai.google/research/teams/brain/pair)(人 + AI 搜索)**。PAIR 通过 [Google](https://ai.google/),将研究人员聚齐,研究并重新设计了人与 AI 系统的交互方式。 | |
**WIT** 是由 Google 的 **[PAIR](https://ai.google/research/teams/brain/pair)(人 + AI 搜索)** 团队发布的一个开源可视化工具 。PAIR 通过 [Google](https://ai.google/) 将研究人员聚齐,研究并重新设计了人与 AI 系统的交互方式。 |
|
||
*** | ||
|
||
The tool can be accessed through TensorBoard or as an extension in a Jupyter or [Colab](https://colab.research.google.com/github/tensorflow/tensorboard/blob/master/tensorboard/plugins/interactive_inference/What_If_Tool_Notebook_Usage.ipynb) notebook. | ||
可以通过 TensorBoard 使用该工具,或者使用 Jupyter 或 [Colab](https://colab.research.google.com/github/tensorflow/tensorboard/blob/master/tensorboard/plugins/interactive_inference/What_If_Tool_Notebook_Usage.ipynb) 笔记本使用。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lsvih 此处我觉得 notebook 是不是不翻译比较好,因为 jupyter notebook 一般都是连用,而且在与 colab 连用时,也很少翻译 notebook。您可以和译者考虑一下。
|
||
To measure the model’s performance, we need to tell the tool what is the ground truth feature i.e the feature that the model is trying to predict which in this case is “**Over-50K**”. | ||
为了衡量模型的性能,我们需要告诉工具什么是基本真实特征,即模型视图预测的特征在这种情况下是“**超过 —— 50k**”。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为了衡量模型的性能,我们需要告诉工具什么是基本真实特征,即模型视图预测的特征在这种情况下是“**超过 —— 50k**”。 | |
为了衡量模型的性能,我们需要告诉工具什么是真实特征,即模型视图预测的特征在这种情况下是“**超过 —— 50k**”。 |
ground truth 一般直接翻译为真实值就可以了,不需要单独翻译 ground。
|
||
![](https://cdn-images-1.medium.com/max/2000/1*pSN720U3hG54Zrkv5UpNag.png) | ||
|
||
We infer that` capital gain` is very non-uniform, with most datapoints having being set to 0. | ||
我们推断 `capital gain` 是极不一致的,大多数数据点都被设置为 0。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我们推断 `capital gain` 是极不一致的,大多数数据点都被设置为 0。 | |
我们推断 `资本收益` 是极不一致的,大多数数据点都被设置为 0。 |
前文既然翻译了这个词,这里应当保持一致。
|
||
![](https://cdn-images-1.medium.com/max/2000/1*pSN720U3hG54Zrkv5UpNag.png) | ||
|
||
We infer that` capital gain` is very non-uniform, with most datapoints having being set to 0. | ||
我们推断 `capital gain` 是极不一致的,大多数数据点都被设置为 0。 | ||
|
||
![](https://cdn-images-1.medium.com/max/2000/1*5FmxAvQhvgNASSwoco5NlA.png) | ||
|
||
![Native Country DIstribution || Sex distribution](https://cdn-images-1.medium.com/max/2000/1*_V4de4Q2lJAEnMWKI-maOQ.png) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
![Native Country DIstribution || Sex distribution](https://cdn-images-1.medium.com/max/2000/1*_V4de4Q2lJAEnMWKI-maOQ.png) | |
![国籍分布 || 性别分布](https://cdn-images-1.medium.com/max/2000/1*_V4de4Q2lJAEnMWKI-maOQ.png) |
|
||
*** | ||
|
||
This was just a quick run-through of some of the what if tools features. WIT is a pretty handy tool which gives the ability to probe the models, into the hands of the people to whom it matters the most. Simply creating and training a model isn’t the purpose of Machine Learning but understanding why and how that model was created is Machine Learning in true sense. | ||
这只是对一些 what-if 工具特性的快速运行。WIT 是一个非常方便的工具,它提供了探测模型的能力,在最重要的人的手中。简单的创建和培训模型并不是机器学习的目的,但理解为什么创建该模型是真正意义上的“机器学习”。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
但理解为什么创建该模型是真正意义上的“机器学习”
->
理解为何创建一个模型才是真正意义上的“机器学习”
理解为何以及如何创建一个模型才是真正意义上的“机器学习”
|
||
### References: | ||
### 参考: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### 参考: | |
### 参考文献: |
@Starriers @leviding 校对完成 |
@Starriers 译者可以考虑一下文中的 notebook 的翻译,我没有全部标记出来,但是个人觉得大多数语境中不适合翻译,应当保留。 |
@Starriers 请于两天内修改本文,如若再次超期,且未及时说明情况,将设定两个月 🚫 禁止 🚫 翻译和校对认领时间,谢谢合作。 |
@leviding @lsvih @TrWestdoor |
@Starriers 已经 merge 啦~ 快快麻溜发布到掘金然后给我发下链接,方便及时添加积分哟。 掘金翻译计划有自己的知乎专栏,你也可以投稿哈,推荐使用一个好用的插件。 |
译文翻译完成,resolve #5812