Skip to content

Commit

Permalink
Update initialization of eval_sets
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander März committed Mar 6, 2024
1 parent d1c46ec commit c586da0
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions lightgbmlss/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,15 +570,8 @@ def set_valid_margin(self,
valid_sets : list
List of tuples containing the train and evaluation set.
"""
valid_sets1 = valid_sets[0]
init_score_val1 = (np.ones(shape=(valid_sets1.get_label().shape[0], 1))) * start_values
valid_sets1.set_init_score(init_score_val1.ravel(order="F"))

valid_sets2 = valid_sets[1]
init_score_val2 = (np.ones(shape=(valid_sets2.get_label().shape[0], 1))) * start_values
valid_sets2.set_init_score(init_score_val2.ravel(order="F"))

valid_sets = [valid_sets1, valid_sets2]
for valid_set in valid_sets:
self.set_init_score(valid_set)

return valid_sets

Expand Down

0 comments on commit c586da0

Please sign in to comment.