Skip to content

Do not throw an Exception when the effect is not identifiable #2

@carloscinelli

Description

@carloscinelli

Martí,

Congratulations on this very simple to use package, it seems great so far.

One design suggestion though.

Instead of throwing an Exception when the effect is not identifiable, I believe you should still return a probability object, but with exactly the information you now provide in the Exception message: that the effect is not ID and the hedge.

The reason being that the effect not being identifiable is not an error in itself, it is the correct behavior of the algorithm.

So it is better to return the formal result of the algorithm (non-identifiability and the reason for non-identifiability) in a way that can be stored in an object for further manipulations.

An exception should be used for real errors and exceptions only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions