From: Sunsern C. <sch...@us...> - 2009-02-19 14:22:25
|
Update of /cvsroot/jboost/jboost/src/jboost/booster In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv32124/src/jboost/booster Modified Files: RobustBoost.java Log Message: * Add another stopping condition. If time is updating too slow, we stop. Index: RobustBoost.java =================================================================== RCS file: /cvsroot/jboost/jboost/src/jboost/booster/RobustBoost.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RobustBoost.java 11 Feb 2009 03:15:39 -0000 1.4 --- RobustBoost.java 19 Feb 2009 14:22:20 -0000 1.5 *************** *** 53,56 **** --- 53,58 ---- protected double m_last_dt; + protected double m_old_t; + /** temporary location for storing the examples as they are read in */ protected List<TmpData> m_tmpList; *************** *** 90,93 **** --- 92,96 ---- m_t = 0.0; + m_old_t = 0.0; m_last_ds = 0; *************** *** 442,445 **** --- 445,450 ---- m_oldWeights[i]= m_weights[i]; + m_old_t = m_t; + // for each prediction for (int i= 0; i < predictions.length; i++) { *************** *** 572,576 **** */ public boolean isFinished() { ! return (1 - m_t < 0.001); } --- 577,581 ---- */ public boolean isFinished() { ! return (1 - m_t < 0.001 || (m_t > 0 && (m_t - m_old_t) < 1E-7)); } |