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

Method set_init_score

python-package/lightgbmmt/basic.py:1419–1437  ·  view source on GitHub ↗

Set init score of Booster to start from. Parameters ---------- init_score : list, numpy 1-D array, pandas Series or None Init score for Booster. Returns ------- self : Dataset Dataset with set init score.

(self, init_score)

Source from the content-addressed store, hash-verified

1417 return self
1418
1419 def set_init_score(self, init_score):
1420 """Set init score of Booster to start from.
1421
1422 Parameters
1423 ----------
1424 init_score : list, numpy 1-D array, pandas Series or None
1425 Init score for Booster.
1426
1427 Returns
1428 -------
1429 self : Dataset
1430 Dataset with set init score.
1431 """
1432 self.init_score = init_score
1433 if self.handle is not None and init_score is not None:
1434 init_score = list_to_1d_numpy(init_score, np.float64, name='init_score')
1435 self.set_field('init_score', init_score)
1436 self.init_score = self.get_field('init_score') # original values can be modified at cpp side
1437 return self
1438
1439 def set_group(self, group):
1440 """Set group size of Dataset (used for ranking).

Calls 3

set_fieldMethod · 0.95
get_fieldMethod · 0.95
list_to_1d_numpyFunction · 0.85