Skip to content

Commit

Permalink
Merge pull request WayScience#35 from MikeLippincott/30-create-custom…
Browse files Browse the repository at this point in the history
…-exceptions-for-each-exception-stated-in-utilspy

create custom exceptions for utils.py
  • Loading branch information
MikeLippincott authored Jul 6, 2023
2 parents da8c149 + c0fcd0e commit 0dc143a
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 55 deletions.
26 changes: 26 additions & 0 deletions MLP_Model/MLP_utils/exceptions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# define python user-defined exceptions


class TrainingValidationTestingSplitError(Exception):
"""Exception occurs in the case that the training, validation, and testing splits do not add up to 1.0"""

pass


class YDataTypeError(Exception):
"""Exception occurs in the case that the y data does not have the correct data type
(e.g., each model has a different y data type)"""

pass


class ModelTypeError(Exception):
"""Exception occurs in the case that the model type is not specified correctly"""

pass


class OptimizationMetricError(Exception):
"""Exception occurs in the case that the optimization metric is not specified correctly"""

pass
Loading

0 comments on commit 0dc143a

Please sign in to comment.