聚类系数(clustering coefficient)计算
来源:互联网 发布:js设置target 编辑:程序博客网 时间:2024/05/16 09:08
转自http://blog.csdn.net/pennyliang/article/details/6838956
Clustering coefficient的定义有两种;全局的和局部的。
全局的算法基于triplet。triplet分为开放的triplet(open triplet)和封闭的triplet(closed triplet)两种(A triplet is three nodes that are connected by either two (open triplet) or three (closed triplet) undirected ties)。
可以用下面结构定义一个triplet
struct triplet { int key; set<int> pair;};
例如下图{1,(2,3)}构成的triplet是封闭的,{3,(4,5)}构成的triplet是开放的
全局的Clustering coefficient比较简单,公式如下:Clustering coefficient(global) = number of closed triplet / number of triplet(closed+open)
以上图为例:
closed triplet ={1,(2,3)},{2,(1,3)},{3,(1,2)}
all triplet = {1,(2,3)},{2,(1,3)},{3,(1,2)},{3,(2,4)},{3,(4,5)},{3,(1,5)},{3,(2,5)},{3,(1,4)}
number of closed triplet = 3
number of triplet = 8
number of triplet / number of triplet = 3/8
局部的Clustering coefficient的计算方法:局部计算是面向节点的,对于节点vi,找出其直接邻居节点集合Ni,计算Ni构成的网络中的边数K,除以Ni集合可能的边数|Ni|*(|Ni|-1)/2例如:1节点的邻居节点(2,3),他们之间构成的边有1条,可能构成的边1条,因此1/1=12节点的邻居节点(1,3),他们之间构成的边有1条,可能构成的边1条,因此1/1=13节点的邻居节点(1,2,4,5),他们之间构成的边有1条,可能构成的边(4*3)/2条,因此1/6=1/6
4节点的邻居节点(3),他们之间构成的边有0条,可能构成的边0条,因此0
5节点的邻居节点(3),他们之间构成的边有0条,可能构成的边0条,因此0
则,5个节点平均local Clustering coefficient = (1+1+1/6)/5=13/30
参考
1)http://en.wikipedia.org/wiki/Clustering_coefficient
2)<<Complex Network>> 3.2 properties of real-world networks p25
- 聚类系数(clustering coefficient)计算
- Clustering coefficient的计算
- 聚类评估算法-轮廓系数(Silhouette Coefficient )
- Jaccard系数(Jaccard Coefficient)和tf-idf方法
- 语音的线性预测系数(Linear Prediction Coefficient,LPC)
- DP9 二项式系数 Binomial Coefficient @geeksforgeeks
- Maximal Information Coefficient 最大信息系数
- 【noip2011D2T1】计算系数(数论)
- 计算系数
- 计算系数
- 计算系数
- 计算系数
- 计算系数
- 计算系数
- 统计学 决定系数(Coefficient of Determination) 和 相关系数 (Correlation of Coefficient )
- Maximal Information Coefficient (MIC)最大互信息系数
- Maximal Information Coefficient (MIC)最大互信息系数
- 判定系数推导 — Coefficient of Determination Derivation
- 使用Spring Boot 返回jsp 变成下载jsp文件
- IPV6地址学习笔记
- jquery JSON的解析方式
- 2016/10/31 宝贝儿蛋,万圣节快乐。
- javascript入门笔记9-认识DOM
- 聚类系数(clustering coefficient)计算
- 慕课-各种下拉菜单
- AndroidStudio常用快捷键,有效提高工作效率
- jquery 如何动态添加、删除class样式方法介绍
- [HIve]日期相关函数
- 51nod-【hihocoder #1032 : 最长回文子串】
- UVa1336 Fixing the Great Wall
- Java中List的排序
- jquery checkbox实现单选小例