Skip to content

Predict time until next developmental transition #3

Description

@pskeshu

Motivation

The session tracks observation history with timestamps and the organism config has expected stage durations. A prediction function could estimate when the next transition will happen for each embryo — useful for adaptive acquisition intervals and user alerts.

Design

A pure function over the session's observation history:

def predict_next_transition(observations, stage_durations) -> TransitionPrediction:
    """Estimate when the current embryo will transition to the next stage."""

Key considerations:

  • Prediction precision is bounded by both biological variability (±30% between embryos) and the timelapse acquisition interval. If acquiring every 3 minutes, predictions finer than ~3 minutes are meaningless.
  • Predictions should adapt per-embryo based on observed transition rate. If embryo_3 transitioned from comma to 1.5fold faster than expected, tighten predictions for subsequent stages.
  • The "early" stage spans 350 minutes — knowing sub-stage (see Volume clipping tool with 3D rendering #5) would dramatically improve prediction during this long window.

Integration

Feeds into the orchestrator's interval rules — slow during stable early, accelerate near predicted transitions. The prediction is part of the Session.summary() that gently's reasoning layer consumes.

What this is NOT

This is not trying to be precise to the minute. It's a rough guide — like a weather forecast — that helps the system allocate attention (acquisition frequency, model tier) across embryos.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions