Skip to content

Conversation

vanAmsterdam
Copy link
Contributor

@vanAmsterdam vanAmsterdam commented Oct 6, 2025

Implements LeftCensoredDistribution and RightCensoredDistribution

These distributions take any base_dist with a cdf method implemented and allow for handling left-or-right censored data. See Issue #1909.

Current status

  • implementation
  • standard tests
  • censored distribution specific tests

@vanAmsterdam vanAmsterdam changed the title Implement LeftCensoredDistribution and RightCensoredDistribution [WIP] Implement LeftCensoredDistribution and RightCensoredDistribution Oct 6, 2025
@vanAmsterdam vanAmsterdam marked this pull request as ready for review October 10, 2025 12:06
@vanAmsterdam
Copy link
Contributor Author

I've removed the tutorial / notebook from this PR to chop up the work


@validate_sample
def log_prob(self, value: ArrayLike) -> ArrayLike:
minval = 1e-7
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this minval was needed to not get -inf in the subsequent log(1-cdf(x)) calculation for observations with very high tail censored observations; this is what I'm most unsure about

@vanAmsterdam vanAmsterdam changed the title [WIP] Implement LeftCensoredDistribution and RightCensoredDistribution Implement LeftCensoredDistribution and RightCensoredDistribution Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant