Skip to content

Commit

Permalink
add Chinese Doc for colunm_expand and correlation
Browse files Browse the repository at this point in the history
Signed-off-by: wangyiqingdx <[email protected]>
  • Loading branch information
wangyiqingdx committed Sep 8, 2023
1 parent 8767db5 commit 64aa263
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
16 changes: 16 additions & 0 deletions doc/federatedml_component/column_expand.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 列增加

列增加模块用作基于用户提供的数值创建任意数量的变量列。该模块运行时新增的数据列被添加到原始数据上,而非添加到由FATE读取原始数据产生的数据变换上。


<!-- mkdocs
## Param
::: federatedml.param.column_expand_param
rendering:
heading_level: 3
show_source: true
show_root_heading: true
show_root_toc_entry: false
show_root_full_path: false
-->
54 changes: 54 additions & 0 deletions doc/federatedml_component/correlation.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# 纵向皮尔逊相关系数

## 模块介绍

纵向皮尔逊相关系数模块用于计算特征列的皮尔逊相关系数。皮尔逊相关系数是两个变量$X$和$Y$的线性相关性的度量,定义如下:

$$\rho_{X,Y} = \frac{cov(X, Y)}{\sigma_X\sigma_Y} = \frac{E[(X-\mu_X)(Y-\mu_Y)]}{\sigma_X\sigma_Y} = E\left[\left(\frac{X-\mu_X}{\sigma_X}\cdot\frac{Y-\mu_Y}{\sigma_Y}\right)\right]$$

令:

$$\tilde{X} = \frac{X-\mu_X}{\sigma_X}, \tilde{Y}=\frac{Y-\mu_Y}{\sigma_Y}$$

则有:

$$\rho_{X, Y} = E[\tilde{X}\tilde{Y}]$$

## 实现细节

我们使用了名为SPDZ的多方安全计算协议实现纵向皮尔逊相关系数模块。要了解更多细节,请参考: [[here](secureprotol.md)]

<!-- mkdocs
## Param
::: federatedml.param.pearson_param
rendering:
heading_level: 3
show_source: true
show_root_heading: true
show_root_toc_entry: false
show_root_full_path: false
-->

## 如何使用

部分参数


- 列索引
- 该参数取值为-1,或者一个int型数值列表。如取值为-1,所有变量列都将参与皮尔逊相关系数的计算;如取值为一个int型数值列表,则索引编号与列表中数值对应的列参与计算。

- 列名称
- 该参数取值为一个字符串型列表。列名出现在列表中的列将参与皮尔逊相关系数的计算。



!!! 提示

如果同时设置了上述两个参数,则两参数限定参与计算的列的合集,将作为最终参与皮尔逊相关系数计算的列。

<!-- mkdocs
## Examples
{% include-examples "hetero_pearson" %}
-->

0 comments on commit 64aa263

Please sign in to comment.