protected override void PrintIterationMessage(IChannel ch, IProgressChannel pch) { // REVIEW: Shift this to use progress channels. #if OLD_TRACING ch.Info("Finished iteration {0}", Ensemble.NumTrees); //This needs to be executed every iteration if (PruningTest != null) { if (PruningTest is TestWindowWithTolerance) { if (PruningTest.BestIteration != -1) { ch.Info("Iteration {0} \t(Best tolerated validation moving average iter {1}:{2}~{3})", Ensemble.NumTrees, PruningTest.BestIteration, (PruningTest as TestWindowWithTolerance).BestAverageValue, (PruningTest as TestWindowWithTolerance).CurrentAverageValue); } else { ch.Info("Iteration {0}", Ensemble.NumTrees); } } else { ch.Info("Iteration {0} \t(best validation iter {1}:{2}>{3})", Ensemble.NumTrees, PruningTest.BestIteration, PruningTest.BestResult.FinalValue, PruningTest.ComputeTests().First().FinalValue); } } else { base.PrintIterationMessage(ch, pch); } #else base.PrintIterationMessage(ch, pch); #endif }
protected override void ComputeTests() { if (_firstTestSetHistory != null) { _firstTestSetHistory.ComputeTests(); } if (_trainRegressionTest != null) { _trainRegressionTest.ComputeTests(); } if (_testRegressionTest != null) { _testRegressionTest.ComputeTests(); } if (PruningTest != null) { PruningTest.ComputeTests(); } }
public override void PrintIterationMessage(IChannel ch, IProgressChannel pch) { // REVIEW: Shift this to use progress channels. #if OLD_TRACING if (PruningTest != null) { if (PruningTest is TestWindowWithTolerance) { if (PruningTest.BestIteration != -1) { ch.Info("Iteration {0} \t(Best tolerated validation moving average WinLossSurplus {1}:{2:00.00}~{3:00.00})", Ensemble.NumTrees, PruningTest.BestIteration, (PruningTest as TestWindowWithTolerance).BestAverageValue, (PruningTest as TestWindowWithTolerance).CurrentAverageValue); } else { ch.Info("Iteration {0}", Ensemble.NumTrees); } } else { ch.Info("Iteration {0} \t(best validation WinLoss {1}:{2:00.00}>{3:00.00})", Ensemble.NumTrees, PruningTest.BestIteration, PruningTest.BestResult.FinalValue, PruningTest.ComputeTests().First().FinalValue); } } else { base.PrintIterationMessage(ch, pch); } #else base.PrintIterationMessage(ch, pch); #endif }