From: Aaron A. <aa...@us...> - 2007-10-13 04:32:33
|
Update of /cvsroot/jboost/jboost/src/jboost/atree In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv490/atree Modified Files: InstrumentedAlternatingTree.java Log Message: Fixed underflow bug in weights and outputting more information with InequalitySplitter NaN bug Index: InstrumentedAlternatingTree.java =================================================================== RCS file: /cvsroot/jboost/jboost/src/jboost/atree/InstrumentedAlternatingTree.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** InstrumentedAlternatingTree.java 2 Oct 2007 02:28:06 -0000 1.3 --- InstrumentedAlternatingTree.java 13 Oct 2007 04:32:27 -0000 1.4 *************** *** 624,627 **** --- 624,639 ---- return b.isFinished(); } + + double EPS = 1e-50; + double w = m_booster.getTotalWeight(); + if ((w < EPS) || Double.isNaN(w)) { + System.out.println("JBoost boosting process is completed."); + System.out.println("\tThe boosting has finished early."); + System.out.println("\tThis is a result of too little weight being placed on examples"); + System.out.println("\t(which will cause an underflow error)."); + System.out.println("\tThis is not necessarily a bad thing. Look at the margin curve to find out more."); + return true; + } + return false; } |