Skip to content

v2: Update parameter table validation for PEtab 2.0 erratum E1 (infinite bounds) #565

Open

Description

@dweindl

PEtab 2.0.0 erratum E1 (PEtab-dev/PEtab#682, PEtab-dev/PEtab#684, errata page) made the following changes:

  • lowerBound may be -inf and upperBound may be inf. inf as a lower bound and -inf as an upper bound are invalid.
  • If priors are specified for any parameter, every estimated parameter with an infinite bound must have an explicit proper prior. The default uniform(lowerBound, upperBound) would be improper.

The current state of petab.v2:

  • Parameter.lb/ub are plain floats without a finiteness check (core.py#L1048-L1055). lb == ub == inf passes validation, because Parameter._validate only checks lb > ub (core.py#L1136). The existing _is_finite_or_neg_inf / _is_finite_or_pos_inf validators for time could be reused here.
  • There is no check that parameters with infinite bounds have an explicit prior when the problem has a MAP objective. Problem.get_priors creates Uniform(p.lb, p.ub) for parameters without a prior, which may be infinite (core.py#L2083).
  • Problem.get_startpoint_distributions creates the same default uniform distribution, also for maximum likelihood problems (core.py#L2101). Start points can't be sampled for parameters with infinite bounds and no prior. This should raise an informative error, or the caller should be able to provide a fallback distribution.

To do:

  • Restrict lb to finite or -inf and ub to finite or inf.
  • Add a validation task: if has_map_objective, every estimated parameter with an infinite bound needs an explicit priorDistribution. Whether the specified prior is proper, e.g. uniform with infinite priorParameters, is still open in the spec. This could be checked together with the existing TODO in CheckPriorDistribution (lint.py#L819).
  • Handle infinite bounds in start point sampling.
  • Test that prior truncation works with one-sided infinite bounds (e.g., log-normal with bounds 0/inf), i.e., that it is a no-op where the bounds match the prior's domain.
  • Nominal values: no change for now. Pending v2: Allow infinite nominalValue PEtab#685, which proposes allowing inf/-inf. Currently, infinite nominal values are not rejected.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions