INNER CODE UNIT · Python

best_num_boost_round

fabsig/GPBoost · python-package/gpboost/engine.py:1222

                best_num_boost_round = np.argmin(cvbst[next(iter(cvbst))]) + 1
            if verbose_eval >= 1:
                metric_name = list(cvbst.keys())[0]
                metric_name = metric_name.split('-mean', 1)[0]
                print("***** New best test score ("+metric_name+" = " + str(best_score) +
                      ") found for the following parameter combination:")
                best_params_print = copy.deepcopy(best_params)
                best_params_print['num_boost_round'] = best_num_boost_round
                print(best_params_print)
        counter_num_comb = counter_num_comb + 1
        if return_all_combinations:
            if higher_better:
                best_num_boost_round = np.argmax(cvbst[next(iter(cvbst))]) + 1
            else:
                best_num_boost_round = np.argmin(cvbst[next(iter(cvbst))]) + 1
            all_combinations[param_comb_number] = {'params': param_comb, 'num_boost_round': best_num_boost_round,
                                                   'score': current_score}
    if best_num_boost_round < 0 or best_score == (1e99 if not higher_better else -1e99):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…