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.
| 341 | * |
| 342 | */ |
| 343 | double 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 | |
| 354 | double GBDT::BoostFromAverage(int class_id, bool update_scorer) { |
| 355 | // boosting from average label; or customized "average" if implemented for the current objective |
no test coverage detected