ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/owl/tags/aglappe-0.6/listInfoGain.java
(Generate patch)
# Line 28 | Line 28
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                          
# Line 41 | Line 41
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);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines