From: Aaron A. <aa...@us...> - 2007-10-02 20:36:47
|
Update of /cvsroot/jboost/jboost/src/jboost/controller In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv3790/controller Modified Files: Configuration.java Controller.java Log Message: Change of version, iterations counting method, and spelling errors Index: Controller.java =================================================================== RCS file: /cvsroot/jboost/jboost/src/jboost/controller/Controller.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Controller.java 14 Jun 2007 16:38:57 -0000 1.4 --- Controller.java 2 Oct 2007 20:36:43 -0000 1.5 *************** *** 75,95 **** try { // read the command line ! try { ! configuration= new ControllerConfiguration(DEFAULT_MANPAGE, argv); ! Monitor.init_log(configuration); ! configuration.checkCommandValues(); ! controller = new Controller(configuration); ! } catch (BadCommandException e) { ! configuration.printUsage(); ! System.err.println("JBoost Exception: " + e.getMessage()); ! } catch (Exception e) { ! configuration.printUsage(); ! System.err.println("JBoost Exception: " + e.getMessage()); ! } ! // the rest of the code can be called from an external main controller.startLearning(); controller.outputLearningResults(); shutdown(); } catch (Exception e) { System.err.println(e.getMessage()); --- 75,91 ---- try { // read the command line ! configuration= new ControllerConfiguration(DEFAULT_MANPAGE, argv); ! Monitor.init_log(configuration); ! configuration.checkCommandValues(); ! controller = new Controller(configuration); ! ! // the rest of the code can be called from an external main controller.startLearning(); controller.outputLearningResults(); shutdown(); + } catch (BadCommandException e) { + configuration.printUsage(); + System.err.println("JBoost Exception: " + e.getMessage()); } catch (Exception e) { System.err.println(e.getMessage()); *************** *** 210,213 **** --- 206,210 ---- m_learningTree= new InstrumentedAlternatingTree(m_splitterBuilderVector, m_booster, m_trainSetIndices,m_config); + System.out.println("Finished creating root (iteration -1)"); } *************** *** 349,353 **** Executor pe=ExecutorSinglet.getExecutor(); - iterNo++; // first iteration shouldn't really count for (int iter= 0; iter < iterNo && !m_learningTree.boosterIsFinished(); iter++) { if (Monitor.logLevel > 1) { --- 346,349 ---- *************** *** 399,402 **** --- 395,403 ---- // run through the losses results to determine the best split int best=0; + if (losses.length==0) { + System.err.println("ERROR: There are no candidate weak hypotheses to add to the tree."); + System.err.println("This is likely a bug in JBoost; please report to JBoost developers."); + System.exit(2); + } double bestLoss=losses[best]; double tmpLoss; *************** *** 421,425 **** + iter); } ! System.out.println("finished learning iteration " + iter); if(m_booster instanceof BrownBoost){ iterNo++; --- 422,426 ---- + iter); } ! System.out.println("Finished learning iteration " + iter); if(m_booster instanceof BrownBoost){ iterNo++; *************** *** 579,585 **** } } ! // the default behavior is to accept each example ! // an example is only refused if we are sampling and its ! // weight is set to zero if (accepted) { addTrainingExample(counter, example, exampleWeight); --- 580,586 ---- } } ! // The default behavior is to accept each example. An ! // example is only refused if we are sampling and its ! // weight is set to zero. if (accepted) { addTrainingExample(counter, example, exampleWeight); *************** *** 588,592 **** if ((counter % 100) == 0) { ! System.out.print("Fead " + counter + " training examples\n"); } } --- 589,593 ---- if ((counter % 100) == 0) { ! System.out.print("Read " + counter + " training examples\n"); } } Index: Configuration.java =================================================================== RCS file: /cvsroot/jboost/jboost/src/jboost/controller/Configuration.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Configuration.java 14 Jun 2007 16:40:41 -0000 1.5 --- Configuration.java 2 Oct 2007 20:36:43 -0000 1.6 *************** *** 54,58 **** private Vector m_validCommands; private String m_unSpecified; ! public final static String VERSION="1.3.1"; private final static String m_usage = "" + "jboost Version " + VERSION + "\n" --- 54,58 ---- private Vector m_validCommands; private String m_unSpecified; ! public final static String VERSION="1.4"; private final static String m_usage = "" + "jboost Version " + VERSION + "\n" |