Skip to content

Commit 793a1fe

Browse files
committed
fix: update for tree-based models
1 parent ce74c53 commit 793a1fe

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

src/sasctl/utils/astore.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -383,18 +383,14 @@ def regression_target(r):
383383
properties["function"] = "classification"
384384
properties["targetVariable"] = classification_target(result)
385385

386-
elif algorithm == "forest":
387-
properties["algorithm"] = "Random forest"
386+
elif algorithm in ("forest", "gradboost", "tree-based models"):
388387

389-
if is_classification(result):
390-
properties["function"] = "classification"
391-
properties["targetVariable"] = classification_target(result)
388+
if algorithm == "forest":
389+
properties["algorithm"] = "Random forest"
390+
elif algorithm == "gradboost":
391+
properties["algorithm"] = "Gradient boosting"
392392
else:
393-
properties["function"] = "prediction"
394-
properties["targetVariable"] = regression_target(result)
395-
396-
elif algorithm == "gradboost":
397-
properties["algorithm"] = "Gradient boosting"
393+
properties["algorithm"] = "Tree-based model"
398394

399395
if is_classification(result):
400396
properties["function"] = "classification"
@@ -427,7 +423,7 @@ def regression_target(r):
427423

428424
else:
429425
properties["tool"] = ""
430-
426+
# todo: warn
431427
return properties
432428

433429

0 commit comments

Comments
 (0)