Skip to content

Commit 7443954

Browse files
author
linyiqun
committed
属性节点互信息值类
属性节点互信息值类
1 parent a489901 commit 7443954

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package DataMining_TAN;
2+
3+
/**
4+
* 属性之间的互信息值,表示属性之间的关联性大小
5+
* @author lyq
6+
*
7+
*/
8+
public class AttrMutualInfo implements Comparable<AttrMutualInfo>{
9+
//互信息值
10+
Double value;
11+
//关联属性值对
12+
Node[] nodeArray;
13+
14+
public AttrMutualInfo(double value, Node node1, Node node2){
15+
this.value = value;
16+
17+
this.nodeArray = new Node[2];
18+
this.nodeArray[0] = node1;
19+
this.nodeArray[1] = node2;
20+
}
21+
22+
@Override
23+
public int compareTo(AttrMutualInfo o) {
24+
// TODO Auto-generated method stub
25+
return o.value.compareTo(this.value);
26+
}
27+
28+
}

0 commit comments

Comments
 (0)