Revision: 17120
          http://sourceforge.net/p/gate/code/17120
Author:   adamfunk
Date:     2013-11-21 17:48:46 +0000 (Thu, 21 Nov 2013)
Log Message:
-----------
Now using a standard (documented) normalization function.

Modified Paths:
--------------
    gate/trunk/plugins/TermRaider/src/gate/termraider/util/Utilities.java

Modified: gate/trunk/plugins/TermRaider/src/gate/termraider/util/Utilities.java
===================================================================
--- gate/trunk/plugins/TermRaider/src/gate/termraider/util/Utilities.java       
2013-11-21 09:38:53 UTC (rev 17119)
+++ gate/trunk/plugins/TermRaider/src/gate/termraider/util/Utilities.java       
2013-11-21 17:48:46 UTC (rev 17120)
@@ -24,6 +24,7 @@
   public static final String EXTENSION_CSV = "csv";
 
   private static double log10of2;
+  private static double xScale = 4.8;
   
   static {
     log10of2 = Math.log10(2.0);
@@ -42,9 +43,17 @@
     return total / ((double) list.size());
   }
   
-  
+  /**
+   * The following produces the right half of a sigmoid 
+   * curve adjusted so that
+   * f(0) = 0; f(inf) = 100; f(x>0) > 0
+   * @param score
+   * @return
+   */
   public static double normalizeScore(double score) {
-    double norm = 1.0 - 1.0 / (1.0 + Math.log10(1.0 + score));
+    double norm = 2.0 / (1.0 + Math.exp(-score / xScale)) - 1.0;
+    // The old normalization function was undocumented
+    //double norm = 1.0 - 1.0 / (1.0 + Math.log10(1.0 + score));
     return (double) (100.0F * norm);
   }
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to