Changeset 4220


Ignore:
Timestamp:
07/22/08 12:31:12 (12 years ago)
Author:
nor
Message:

With 100% reduced println error messages!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/slim/GACurveFitter.java

    r4219 r4220  
    4949  protected int stallGenerations; 
    5050 
     51  private static final boolean DEBUG = false; 
     52   
    5153  // -- Constructor -- 
    5254 
     
    171173    } 
    172174    for(int q = 0; q < curveEstimate.length; q++) { 
    173       System.out.println("c" + q + ": " + curveEstimate[q][2]); 
     175      if(DEBUG) System.out.println("c" + q + ": " + curveEstimate[q][2]); 
    174176    } 
    175177  } 
     
    177179  // Returns the Chi Squared Error of the current curve estimate 
    178180  public double getChiSquaredError() { 
    179     System.out.println("**********"); 
     181    if(DEBUG) System.out.println("**********"); 
    180182    double total = 0.0d; 
    181183    double[] expected = getEstimates(curveData, curveEstimate); 
     
    188190        // (o-e)^2 / e 
    189191        term /= expected[i]; 
    190         System.out.println("Obs: " + observed + 
     192        if(DEBUG) System.out.println("Obs: " + observed + 
    191193          " Expect: " + expected[i] + " Term: " + term); 
    192194        total += term; 
     
    261263            (curveData[i] - guessC) / (curveData[i-1] - guessC); 
    262264          double guess = 1.0 * -Math.log(factor); 
    263           System.out.println("Guess: " + guess + "   Factor: " + factor); 
     265          if(DEBUG) System.out.println("Guess: " + guess + "   Factor: " + factor); 
    264266          num += (guess * (curveData[i] - guessC)); 
    265267          den += curveData[i] - guessC; 
     
    267269      } 
    268270      double exp = num/den; 
    269       System.out.println("Final exp guess: " + exp); 
     271      if(DEBUG) System.out.println("Final exp guess: " + exp); 
    270272      num = 0.0; 
    271273      den = 0.0; 
     
    282284          num += guessA * (curveData[i] - guessC); 
    283285          den += curveData[i] - guessC; 
    284           System.out.println("Data: " + curveData[i] + " Value: " + value + " guessA: " + guessA); 
     286          if(DEBUG) System.out.println("Data: " + curveData[i] + " Value: " + value + " guessA: " + guessA); 
    285287        } 
    286288      } 
Note: See TracChangeset for help on using the changeset viewer.