From: <jen...@us...> - 2013-05-10 21:55:35
|
Revision: 3979 http://sourceforge.net/p/dl-learner/code/3979 Author: jenslehmann Date: 2013-05-10 21:55:32 +0000 (Fri, 10 May 2013) Log Message: ----------- bug fix in F-beta Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/learningproblems/Heuristics.java Modified: trunk/components-core/src/main/java/org/dllearner/learningproblems/Heuristics.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/learningproblems/Heuristics.java 2013-05-10 13:27:03 UTC (rev 3978) +++ trunk/components-core/src/main/java/org/dllearner/learningproblems/Heuristics.java 2013-05-10 21:55:32 UTC (rev 3979) @@ -52,10 +52,10 @@ */ public static double getFScore(double recall, double precision, double beta) { return (precision + recall == 0) ? 0 : - ( (1+Math.sqrt(beta)) * (precision * recall) - / (Math.sqrt(beta) * precision + recall) ); + ( (1+ beta * beta) * (precision * recall) + / (beta * beta * precision + recall) ); } - + /** * Computes arithmetic mean of precision and recall, which is called "A-Score" * here (A=arithmetic), but is not an established notion in machine learning. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |