From: Sunsern C. <sch...@us...> - 2009-02-19 14:23:36
|
Update of /cvsroot/jboost/jboost/src/jboost/monitor In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv32242/src/jboost/monitor Modified Files: Monitor.java Log Message: * print out time information for RobustBoost Index: Monitor.java =================================================================== RCS file: /cvsroot/jboost/jboost/src/jboost/monitor/Monitor.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Monitor.java 11 Sep 2008 21:25:45 -0000 1.12 --- Monitor.java 19 Feb 2009 14:23:29 -0000 1.13 *************** *** 11,14 **** --- 11,16 ---- import jboost.booster.Booster; import jboost.booster.BrownBoost; + import jboost.booster.MulticlassWrapMH; + import jboost.booster.RobustBoost; import jboost.controller.Configuration; import jboost.controller.Configuration; *************** *** 135,139 **** infoStream.println("Init Start time = " + startTime); infoStream.println("Learn Start time = " + afterInitTime); ! infoStream.println("iter \tbound \ttrain \ttest"); infoStream.flush(); } catch (IOException e) { --- 137,156 ---- infoStream.println("Init Start time = " + startTime); infoStream.println("Learn Start time = " + afterInitTime); ! ! // RobustBoost: binary case ! if (booster instanceof RobustBoost) { ! infoStream.println("iter \tbound \ttrain \ttest \ttime"); ! } ! // RobustBoost: multiclass case ! else if (booster instanceof MulticlassWrapMH) { ! Booster b = ((MulticlassWrapMH)booster).m_booster; ! if (b instanceof RobustBoost) { ! infoStream.println("iter \tbound \ttrain \ttest \ttime"); ! } ! } ! else { ! infoStream.println("iter \tbound \ttrain \ttest"); ! } ! infoStream.flush(); } catch (IOException e) { *************** *** 168,173 **** double theoryBound= m_booster.getTheoryBound(); NumberFormat f= new DecimalFormat("0.0000"); ! infoStream.print(iter + "\t" + f.format(theoryBound) + "\t" ! + f.format(trainError) + "\t" + f.format(testError)); infoStream.flush(); logBoosting(iter, combined, base); --- 185,209 ---- double theoryBound= m_booster.getTheoryBound(); NumberFormat f= new DecimalFormat("0.0000"); ! ! // RobustBoost: binary case ! if (m_booster instanceof RobustBoost) { ! double currentTime = ((RobustBoost)m_booster).getCurrentTime(); ! infoStream.print(iter + "\t" + f.format(theoryBound) + "\t" ! + f.format(trainError) + "\t" + f.format(testError) + "\t" + f.format(currentTime)); ! } ! // RobustBoost: multiclass case ! else if (m_booster instanceof MulticlassWrapMH) { ! Booster b = ((MulticlassWrapMH)m_booster).m_booster; ! if (b instanceof RobustBoost) { ! double currentTime = ((RobustBoost)b).getCurrentTime(); ! infoStream.print(iter + "\t" + f.format(theoryBound) + "\t" ! + f.format(trainError) + "\t" + f.format(testError) + "\t" + f.format(currentTime)); ! } ! } ! // otherwise ! else { ! infoStream.print(iter + "\t" + f.format(theoryBound) + "\t" ! + f.format(trainError) + "\t" + f.format(testError)); ! } infoStream.flush(); logBoosting(iter, combined, base); |