Skip to content

Commit fbbe42f

Browse files
benchmarks
1 parent 51ad8fe commit fbbe42f

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed
Binary file not shown.

python/benchmarks.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ def trial_filter(task):
3434
"poker",
3535
"mnist",
3636
"parity5",
37-
"564_fried",
38-
"1191_BNG_pbc",
39-
"1196_BNG_pharynx",
4037
"1595_poker",
4138
]
4239
)
@@ -50,8 +47,8 @@ def trial_filter(task):
5047
return []
5148

5249
return [
53-
# "xgboost-base",
54-
# "ebm-base",
50+
"xgboost-base",
51+
"ebm-base",
5552
"aplr-base",
5653
]
5754

@@ -209,9 +206,23 @@ def trial_runner(trial):
209206
raise Exception(f"Unrecognized task problem {trial.task.problem}")
210207

211208
if trial.method.name == "aplr-base":
209+
if trial.task.problem == "regression":
210+
aplr_estimator: APLRRegressor = est.steps[1][1]
211+
optimal_m = aplr_estimator.get_optimal_m()
212+
terms = len(aplr_estimator.get_term_names())
213+
else:
214+
aplr_estimator: APLRClassifier = est.steps[1][1]
215+
optimal_m = 0
216+
terms = 0
217+
for category in aplr_estimator.get_categories():
218+
model = aplr_estimator.get_logit_model(category)
219+
optimal_m = max(model.get_optimal_m(), optimal_m)
220+
terms = max(len(model.get_term_names()), terms)
212221
trial.log("rows", X_train.shape[0])
213222
trial.log("columns", X_train.shape[1])
214223
trial.log("columns_transformed", ct.transform(X_train).shape[1])
224+
trial.log("optimal_m", optimal_m)
225+
trial.log("terms", terms)
215226
completed_so_far.add(trial._task.name)
216227
joblib.dump(completed_so_far, "completed_so_far.zip", 9)
217228
try:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
setuptools.setup(
2929
name="aplr",
30-
version="10.6.0",
30+
version="10.6.1",
3131
description="Automatic Piecewise Linear Regression",
3232
ext_modules=[sfc_module],
3333
author="Mathias von Ottenbreit",

0 commit comments

Comments
 (0)