28 |
|
int l = (int)((nbhood.length()-1)/2); |
29 |
|
int N = 1; |
30 |
|
System.out.println("ListInfoGain"); |
31 |
< |
System.out.print("0 - ("+nbhood+")("+l+") "); |
32 |
< |
entropy = getEntropy( nbhood); |
31 |
> |
System.out.print("0 - (%x%)("+l+") "); |
32 |
> |
entropy = getEntropy( "%x%"); |
33 |
|
System.out.println( entropy + " bits."); |
34 |
|
System.out.println("Symbols in nbhood :"+l); |
35 |
|
|
41 |
|
|
42 |
|
if (middle.equals("%x")) { // switch from N to C of X |
43 |
|
N = -1; |
44 |
+ |
newhood = "%x%"; |
45 |
|
} else { |
46 |
|
if (N < 0) // we are in the C-terminal section |
47 |
|
newhood = "%x"+middle+"%"; |
48 |
|
else // N terminal (before X) |
49 |
|
newhood = middle+"%x%"; |
50 |
|
} // end if |
51 |
< |
System.out.print( newhood); |
51 |
> |
System.out.print( " -> " + newhood); |
52 |
|
newentropy = getEntropy( newhood); |
53 |
|
gain = newentropy-entropy; |
54 |
|
System.out.println( " : "+newentropy +"bits, gain="+gain); |