Skip to content

Commit 4f5e0d4

Browse files
authored
bump sklearn to 1.6 and rename deprecated parameters (#377)
Fix #376
1 parent 66447f2 commit 4f5e0d4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

ngboost/ngboost.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ def partial_fit(
381381
X,
382382
Y,
383383
accept_sparse=True,
384-
force_all_finite="allow-nan",
384+
ensure_all_finite="allow-nan",
385385
multi_output=self.multi_output,
386386
y_numeric=True,
387387
)
@@ -398,7 +398,7 @@ def partial_fit(
398398
X_val,
399399
Y_val,
400400
accept_sparse=True,
401-
force_all_finite="allow-nan",
401+
ensure_all_finite="allow-nan",
402402
multi_output=self.multi_output,
403403
y_numeric=True,
404404
)
@@ -532,7 +532,7 @@ def pred_dist(self, X, max_iter=None):
532532
A NGBoost distribution object
533533
"""
534534

535-
X = check_array(X, accept_sparse=True, force_all_finite="allow-nan")
535+
X = check_array(X, accept_sparse=True, ensure_all_finite="allow-nan")
536536

537537
params = np.asarray(self.pred_param(X, max_iter))
538538
dist = self.Dist(params.T)
@@ -579,7 +579,7 @@ def predict(self, X, max_iter=None):
579579
Numpy array of the estimates of Y
580580
"""
581581

582-
X = check_array(X, accept_sparse=True, force_all_finite="allow-nan")
582+
X = check_array(X, accept_sparse=True, ensure_all_finite="allow-nan")
583583

584584
return self.pred_dist(X, max_iter=max_iter).predict()
585585

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ license = "Apache License 2.0"
1414

1515
[tool.poetry.dependencies]
1616
python = ">=3.9, <3.13"
17-
scikit-learn = ">=1.0.2"
17+
scikit-learn = "^1.6"
1818
numpy = ">=1.21.2"
1919
scipy = ">=1.7.2"
2020
tqdm = ">=4.3"

0 commit comments

Comments
 (0)