forked from X-lab2017/open-digger
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc(website): add zh doc for openrank (X-lab2017#1191)
Signed-off-by: frank-zsy <[email protected]>
- Loading branch information
Showing
8 changed files
with
112 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
- [贡献指南](/zh-cn/CONTRIBUTING.md) | ||
- [工作流](/zh-cn/workflow.md) | ||
- [数据描述](/zh-cn/data.md) | ||
- 指标说明 | ||
- [全域 OpenRank](/zh-cn/metrics/global_openrank.md) | ||
- [项目 OpenRank](/zh-cn/metrics/project_openrank.md) | ||
- [项目与活动](/zh-cn/events.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# 全域 OpenRank | ||
|
||
   | ||
|
||
## 定义 | ||
|
||
全域 OpenRank 是一个由 X-lab 开放实验室提出的开源指标,该指标由赵生宇博士提出,关于全域 OpenRank 的算法细节可以参考[这篇博客](https://blog.frankzhao.cn/how_to_measure_open_source_3)。 | ||
|
||
全域 OpenRank 是`活跃度`指标的一个下游指标,借鉴了`活跃度`来构建 GitHub 全域项目与开发者之间的一个协作网络,其网络模型是: | ||
|
||
 | ||
|
||
在全域 OpenRank 指标的实现中,使用`活跃度`指标作为开发者与仓库之间的边的权重,从而构建出全域协作网络来计算网络中每个节点在每个月的全域 OpenRank 值。但与`活跃度`不同的地方在于,我们并没有对开发者的加权活跃值进行开方运算,这是由于`活跃度`指标中的开方运算是为了将社区参与人数(社区规模)的因素引入到指标计算中,但对于协作网络而言,社区参与人数这个变量已经隐含在了网络结构中。 | ||
|
||
与传统 PageRank 不同之处在于,计算中每个节点的全域 OpenRank 值将不仅仅依赖于当月的协作网络结构,并且也部分依赖于该节点在上个月的全域 OpenRank 值。即对于全域协作网络中的每个开发者和仓库节点,会部分的继承其历史的 OpenRank 值,这里也是体现了开源中珍视长期价值的价值观。 | ||
|
||
## 代码 | ||
|
||
由于全域 OpenRank 是基于 Neo4j 数据库的图指标实现,我们并没有在 OpenDigger 中完全开源全域 OpenRank 的计算代码。但我们将每月的结算结果导入到了 ClickHouse 数据库中,因此依然可以通过 OpenDigger 的[代码]((https://github.com/X-lab2017/open-digger/blob/master/src/metrics/indices.ts#L21))来访问各项目与开发者的全域 OpenRank 值。 | ||
|
||
## 参数 | ||
|
||
全域 OpenRank 的计算中包含的参数如下: | ||
|
||
| 参数名 | 值 | 参数描述 | 注 | | ||
| :------------- | :---- | :---------- | :--- | | ||
| OpenRank 默认值 | 1.0 | 协作网中新节点的默认值,例如新加入网络的开发者节点与新仓库 | | | ||
| 开发者继承比例 | 0.5 | 开发者节点对于上个月 OpenRank 的依赖比例 | 该算法认为相较于仓库,开发者的价值更应体现出开源中的长期价值,因此开发者对于历史价值的依赖度较高 | | ||
| 仓库继承比例 | 0.3 | 仓库节点对于上个月 OpenRank 的依赖比例 | | | ||
| OpenRank 衰减系数 | 0.85 | 对于当月不活跃的开发者和仓库节点的 OpenRank 衰减比例 | OpenRank 价值并不会因为开发者或仓库仅在某月不活跃就直接清零 | | ||
| OpenRank 最小值 | 0.1 | 当节点 OpenRank 衰减值该值以下时清空节点 OpenRank | | | ||
|
||
## CodePen 示例 | ||
|
||
<iframe height="600" style="width: 100%;" scrolling="no" title="OpenDigger - [X-lab] OpenRank/Activity/Bus Factor" src="https://codepen.io/frank-zsy/embed/bGjyqQj?default-tab=js%2Cresult&editable=true&type=openrank" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true"> | ||
See the Pen <a href="https://codepen.io/frank-zsy/pen/bGjyqQj"> | ||
OpenDigger - [X-lab] OpenRank/Activity/Bus Factor</a> by Frank Zhao (<a href="https://codepen.io/frank-zsy">@frank-zsy</a>) | ||
on <a href="https://codepen.io">CodePen</a>. | ||
</iframe> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# 项目 OpenRank | ||
|
||
   | ||
|
||
## 定义 | ||
|
||
项目 OpenRank 是一个由 X-lab 开放实验室提出的开源指标,该指标由赵生宇博士提出,关于项目 OpenRank 的算法细节可以参考[这篇博客](https://blog.frankzhao.cn/openrank_in_project/)。 | ||
|
||
与全域 OpenRank 指标的计算方法类似,该算法使用项目内的 Issue、PR 等协作数据来构建网络,其网络模型为: | ||
|
||
 | ||
|
||
## 代码 | ||
|
||
项目 OpenRank 算法实现尚未开源到 OpenDigger 中,但其底层使用的用于计算通用 OpenRank 的 Neo4j [插件项目](https://github.com/X-lab2017/openrank-neo4j-gds)已经开源,欢迎大家使用。 | ||
|
||
## 参数 | ||
|
||
项目 OpenRank 相较于全域 OpenRank 更加复杂,包含较多参数: | ||
|
||
| 参数名 | 值 | 描述 | 注 | | ||
| :------------- | :---- | :---------- | :--- | | ||
| 开发者/仓库 OpenRank 默认值 | 1.0 | 网络中开发者与仓库的 OpenRank 默认值,例如新加入社区的开发者或新仓库 | | | ||
| Issue OpenRank 默认值 | 2.0 | 网络中 Issue 节点的 OpenRank 默认值 | | | ||
| 未合入 PR OpenRank 默认值 | 3.0 | 网络中未合入的 PR 节点的 OpenRank 默认值 | | | ||
| 已合入 PR OpenRank 默认值 | 5.0 | 网络中已合入的 PR 节点的 OpenRank 默认值 | | | ||
| 开发者/仓库继承比例 | 0.15 | 网络中开发者/仓库节点对上月历史 OpenRank 或初始 OpenRank 的继承比例 | 项目内 OpenRank 中,开发者的价值更应依赖于当月的活跃情况 | | ||
| Issue/PR 继承比例 | 0.8 | 网络中 Issue/PR 节点对上个月历史 OpenRank 或初始 OpenRank 的继承比例 | Issue/PR 的价值应当相对稳定且更依赖于自身的价值 | | ||
| OpenRank 衰减系数 | 0.8 | 对于当月不活跃开发者/Issue/PR 的 OpenRank 衰减比例 | 网络中各节点的 OpenRank 不应在当月不活跃后立即清零 | | ||
| OpenRank 最小值 | 0.1 | 当网络中节点 OpenRank 值衰减至该值以下时将清零 | | | ||
| Issue/PR 节点延属于边流向仓库节点的 OpenRank 比例 | 0.1 | Issue/PR 节点的 OpenRank 有多少比例转移到仓库节点 | | | ||
| 仓库节点延属于边流向 Issue/PR 节点的 OpenRank 比例 | 平均 | 仓库节点的 OpenRank 将平均分配到所有 Issue/PR 节点 | | | ||
| Issue/PR 节点延活跃边流向开发者节点的 OpenRank 比例 | 0.9 | Issue/PR 节点的 OpenRank 有多少比例转移到开发者节点 | | | ||
| 开发者节点延活跃边流向 Issue/PR 节点的 OpenRank 比例 | 1.0 | 开发者节点的 OpenRank 有多少比例转移到 Issue/PR 节点 | | | ||
| `发起`动作活跃比例 | 0.5 | Issue/PR 的价值有多少将转移到其作者 | Issue/PR 作者将优先获取其 50% 的价值,剩余 50% 由其他参与者获得 | | ||
| `发起`/`评论`/`Review`/`关闭` 动作权重 | 2/1/1/2 | 用于计算活跃边权重时各类事件的权重 | | | ||
| 👍/❤️/🚀 表情权重 | 2/3/4 | 用于计算 Issue/PR 初始 OpenRank 的表情的权重 | Issue/PR 的初始 OpenRank 将由其社区中开发者对其添加的表情所决定 | | ||
|
||
## CodePen 示例 | ||
|
||
> 出于计算成本的考虑,我们并没有对所有项目生成项目 OpenRank,目前已经支持的项目包含 X-lab [XSOSI](https://github.com/X-lab2017/open-digger/blob/master/notebook/community_analysis/xlab.ipynb) 中的所有项目以及[阿里巴巴开源开发者贡献榜](https://opensource.alibaba.com/collection/contribution_leaderboard)中的所有项目. | ||
<iframe height="600" style="width: 100%;" scrolling="no" title="OpenDigger - [X-lab] OpenRank/Activity/Bus Factor" src="https://codepen.io/frank-zsy/embed/abjMXBV?default-tab=js%2Cresult&editable=true" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true"> | ||
See the Pen <a href="https://codepen.io/frank-zsy/pen/bGjyqQj"> | ||
OpenDigger - [X-lab] OpenRank/Activity/Bus Factor</a> by Frank Zhao (<a href="https://codepen.io/frank-zsy">@frank-zsy</a>) | ||
on <a href="https://codepen.io">CodePen</a>. | ||
</iframe> | ||
|