Skip to content

Consider input validation to loss functions #1

@asmith26

Description

@asmith26

We have currently/intentionally not added input validation and exception raising to loss functions to prevent potential performance loss. It could be beneficial to explore mechanisms (e.g. potentially via python decorators) for adding this.

Validations suggestions:

  • test_raises_error_when_any_y_true_and_y_pred_lengths_different
  • For losses that expect a probability input (between 0 and 1).
    • test_raises_error_when_y_true_not_sum_1
    • test_raises_error_when_y_pred_not_sum_1
    • test_raises_error_when_any_y_pred_le_0
    • test_raises_error_when_any_y_pred_gt_1

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions