Skip to content

Reduction contract: transient observable time-series -> scalar CalibrationTarget (Cmax), + repeated-dose scenario spec #57

Description

@jeliason

Context

Authoring a CalibrationTarget for a transient pharmacodynamic readout: peak serum IL-18 binding protein (IL-18BP) after a 5-day IV rhIL-18 course (Robertson 2006, iboctadekin phase I). The model observable — total IL-18BP (free + complex), ng/mL — rises, peaks (~day 5–7), then declines. The empirical target is a scalar Cmax.

In maple, observable.code (compute_observable(time, species_dict, constants)) is validated to return an array matching len(time) (see calibration_target_models.py, ScalarReturnError / ArrayLengthError). For a scalar target (index_values=None, median length 1), I can't find where/how that per-timepoint series is reduced to the single value compared against empirical_data.median in the likelihood.

Questions

  1. Time reduction. For a scalar CalibrationTarget, how is the observable time-series reduced before the likelihood compares it to empirical_data.median? Candidates: (a) value at a scenario-defined measurement/readout time, (b) max() over the series (peak/Cmax), (c) final value, (d) mean/AUC. Where in qsp-inference is this implemented? For a Cmax target the correct reduction is the peak — I want to confirm the harness does that rather than sampling a fixed time (our model peaks ~day 7 vs the paper's days 2–5, so a fixed-time readout would bite).

  2. Dosing scenario. How is a repeated IV schedule (rhIL-18 daily ×5) specified so the simulation applies it? Is there a structured dose spec (amount / interval / repeats / target species) the harness consumes, or is Scenario.interventions[*].intervention_description free text mapped to a dosing mechanism elsewhere? A minimal dose-scenario example would help.

Why it matters

Without the reduction contract, observable.code + the Scenario can be schema-valid but semantically wrong (e.g. reduced at the wrong time). Happy to add a short docs note once clarified.

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