Skip to content

Commit 608ff96

Browse files
committed
cleanup perf issues
1 parent cb22686 commit 608ff96

File tree

1 file changed

+3
-2
lines changed
  • src/sasctl/utils/pyml2ds/connectors/ensembles

1 file changed

+3
-2
lines changed

src/sasctl/utils/pyml2ds/connectors/ensembles/core.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ def __init__(self, out_transform="{0}", out_var_name="P_TARGET"):
2525
def _iter_trees(self):
2626
pass
2727

28-
def _aggregate(self, booster_count):
28+
@classmethod
29+
def _aggregate(cls, booster_count):
2930
return "treeValue = sum({});\n".format(', '.join(
30-
["treeValue%d" % i for i in range(booster_count)]))
31+
"treeValue%d" % i for i in range(booster_count)))
3132

3233
def translate(self, f):
3334
"""Translate a gradient boosting model and write SAS scoring code to a file.

0 commit comments

Comments
 (0)