Skip to content

Commit 2ea05b3

Browse files
committed
Don't overwrite user defined model_function
1 parent 23e8778 commit 2ea05b3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/sasctl/pzmm/write_json_files.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,17 +351,17 @@ def write_model_properties_json(
351351
)
352352

353353
if not target_values:
354-
model_function = "Prediction"
354+
model_function = model_function if model_function else "Prediction"
355355
target_level = "INTERVAL"
356356
target_event = ""
357357
event_prob_var = ""
358358
elif isinstance(target_values, list) and len(target_values) == 2:
359-
model_function = "Classification"
359+
model_function = model_function if model_function else "Classification"
360360
target_level = "BINARY"
361361
target_event = str(target_values[0])
362362
event_prob_var = f"P_{target_values[0]}"
363363
elif isinstance(target_values, list) and len(target_values) > 2:
364-
model_function = "Classification"
364+
model_function = model_function if model_function else "Classification"
365365
target_level = "NOMINAL"
366366
target_event = ""
367367
event_prob_var = ""

0 commit comments

Comments
 (0)