Skip to content

Commit

Permalink
Renamed deviance to log_loss in GBDT hyperparams
Browse files Browse the repository at this point in the history
Scikit-Learn has renamed the `deviance` hyperparameter in their GBDT
Classifier to `log_loss`. This deprecation prevented GOSDT from being
built for Python3.10+. The `log_loss` change does force us to no-longer
support Python3.7.

Signed-off-by: Ilias Karimalis <iliaskarimalis@outlook.com>
  • Loading branch information
ilias-karimalis committed Mar 25, 2024
1 parent d0c3890 commit 6333e56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gosdt/model/threshold_guess.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import time
import random
import sys
import os
import os
from queue import Queue
import pathlib

Expand All @@ -16,7 +16,7 @@

# fit the tree using gradient boosted classifier
def fit_boosted_tree(X, y, n_est=10, lr=0.1, d=1):
clf = GradientBoostingClassifier(loss='deviance', learning_rate=lr, n_estimators=n_est, max_depth=d,
clf = GradientBoostingClassifier(loss='log_loss', learning_rate=lr, n_estimators=n_est, max_depth=d,
random_state=42)
clf.fit(X, y)
out = clf.score(X, y)
Expand Down

0 comments on commit 6333e56

Please sign in to comment.