uclamii / model_tuner

A library to tune the hyperparameters of common ML models. Supports calibration and custom pipelines.
Apache License 2.0
3 stars 0 forks source link

Enforce Required model_type Parameter in Model Class #90

Closed lshpaner closed 2 weeks ago

lshpaner commented 2 weeks ago

This PR enforces the specification of the model_type parameter (classification or regression) when creating an instance of the Model class. Previously, model_type defaulted to "classification", but this could lead to unintended behavior if the user did not explicitly specify the type of model.

Changes

Removed Default Value for model_type:

  # Check if model_type is provided and valid
  if model_type not in ["classification", "regression"]:
      raise ValueError("You must specify model_type as either 'classification' or 'regression'.")