Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdboom committed Apr 5, 2022
1 parent f37e9a4 commit 4eace8f
Show file tree
Hide file tree
Showing 145 changed files with 444 additions and 445 deletions.
3 changes: 1 addition & 2 deletions atom/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@
"""

import random
from random import randint

import numpy as np
from scipy.spatial.distance import cdist
Expand Down Expand Up @@ -1202,7 +1201,7 @@ def est_class(self):
def get_estimator(self, **params):
"""Return the model's estimator with unpacked parameters."""
if self.T.random_state is None: # XGBoost can't handle random_state to be None
random_state = params.pop("random_state", randint(0, 1e5))
random_state = params.pop("random_state", random.randint(0, 1e5))
else:
random_state = params.pop("random_state", self.T.random_state)
return self.est_class(
Expand Down
Loading

0 comments on commit 4eace8f

Please sign in to comment.