Skip to content

Commit d4e0d71

Browse files
authored
Issue #65: model_type check in categorical data processor constructor.
1 parent 79871ab commit d4e0d71

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

cobra/preprocessing/categorical_data_processor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ def __init__(self,
7171
scale_contingency_table: bool = True,
7272
forced_categories: dict = {}):
7373

74-
# assert model_type in ["classification", "regression"], "define an appropriate model type"
74+
if model_type not in ["classification", "regression"]:
75+
raise ValueError("An unexpected model_type was provided. Valid model_types are either 'classification' or 'regression'.")
7576

7677
self.model_type = model_type
7778
self.regroup = regroup

0 commit comments

Comments
 (0)