MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / ObtainAutomaticInitialScore

Function ObtainAutomaticInitialScore

src/boosting/gbdt.cpp:343–352  ·  view source on GitHub ↗

If the custom "average" is implemented it will be used inplace of the label average (if enabled) * * An improvement to this is to have options to explicitly choose * (i) standard average * (ii) custom average if available * (iii) any user defined scalar bias (e.g. using a new option "init_score" that overrides (i) and (ii) ) * * (i) and (ii) could be selected as say "auto_init_score" = 0 or 1 etc.

Source from the content-addressed store, hash-verified

341*
342*/
343double ObtainAutomaticInitialScore(const ObjectiveFunction* fobj, int class_id) {
344 double init_score = 0.0;
345 if (fobj != nullptr) {
346 init_score = fobj->BoostFromScore(class_id);
347 }
348 if (Network::num_machines() > 1) {
349 init_score = Network::GlobalSyncUpByMean(init_score);
350 }
351 return init_score;
352}
353
354double GBDT::BoostFromAverage(int class_id, bool update_scorer) {
355 // boosting from average label; or customized "average" if implemented for the current objective

Callers 1

BoostFromAverageMethod · 0.70

Calls 1

BoostFromScoreMethod · 0.45

Tested by

no test coverage detected