Skip to content

Instantly share code, notes, and snippets.

@ajtulloch
Created October 31, 2013 18:11
Show Gist options
  • Save ajtulloch/7254274 to your computer and use it in GitHub Desktop.
Save ajtulloch/7254274 to your computer and use it in GitHub Desktop.
func (b *boostingTreeGenerator) doBoostingRound(e Examples, round int) {
startTime := time.Now()
defer func() {
glog.Infof("Round %v, duration %v", round, time.Now().Sub(startTime))
}()
if b.forestConfig.GetStochasticityConfig() != nil {
e = e.subsampleExamples(b.forestConfig.GetStochasticityConfig().GetPerRoundSamplingRate())
}
// Trim the low-sample influencers
if b.forestConfig.GetInfluenceTrimmingConfig() != nil &&
b.forestConfig.GetInfluenceTrimmingConfig().GetWarmupRounds() < int64(round) {
e = b.doInfluenceTrimming(e)
}
b.updateExampleWeights(e)
b.constructWeakLearner(e)
metrics := b.computeTrainingMetrics(e)
glog.Infof("Epoch: %v, Metrics: %+v", round, metrics)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment