Skip to content

A joint model's unit as a block of a non-repairable diagram; surpyval 0.25 - #364

Merged
derrynknife merged 1 commit into
devfrom
feat/joint-blocks
Oct 17, 2026
Merged

derrynknife merged 1 commit into
devfrom
feat/joint-blocks

Conversation

@derrynknife

Copy link
Copy Markdown
Owner

A unit of a surpyval joint model (readings and failures, surpyval.WeibullJointPH), given its readings, becomes a block of a NonRepairableRBD.

API

  • JointNode(pred) for a DynamicPrediction, or JointNode(joint_model, Z=..., markers=..., age=...). A DynamicPrediction given directly as a node is wrapped. A bare JointModel is refused, with a pointer to these.
  • Time is time from now. Reliability is pred.sf(age + t) (already conditioned on reaching age), lifetimes are pred.qf(u) - age (row-batched like RegressionNode), and mean() is the mean residual life. It is inf where the model leaves a chance of never failing, as a linear path with a varying slope does; this is documented.
  • States. The node's age is the prediction's. A NodeState may say it has failed or repeat that age; any other age is refused, so the unit is never conditioned twice.
  • Repairable. RepairableRBD and NonRepairable refuse a joint model with a clear message. The units after the first are new and have none of the readings, and these components draw every life from one surpyval distribution.
  • Serialisation. The node saves as kind: "joint_node": JointModel.to_dict() plus the unit's covariates, readings and age. It round-trips through JSON and exactly(), so n_jobs workers can load it.
  • Routes. The node is numerical (quadrature over the marker path). There is a catalogue diagram joint, and its row is in the README capability matrix.

surpyval 0.25 is now required. The full suite passes against 0.25 from PyPI with no deprecation warnings. Two local-only failures happen on macOS with 0.24 too: test_mixture_lives::test_a_life_given_an_age_is_the_root_to_the_last_bits and test_expected_window::test_a_nested_rbd_counts_as_the_flat_one_does, both last-bit rounding.

Docs and changelog. There's a guide section in condition-based evaluation, an API entry, a README line and a CHANGELOG entry.

Tests. test_joint_node.py checks series and parallel against hand products, Monte Carlo against exact, the age conflict, the repairable refusal, the JSON round trip, input checks and routes. The fixture is catalogue.joint_model(), a small synthetic fleet fitted once.

🤖 Generated with Claude Code

https://claude.ai/code/session_019Km2eWBiPJ5JNkme3vRg4B

A unit of a surpyval joint model of readings and failures, given its
readings, is a node of a NonRepairableRBD: a JointNode, or the unit's
DynamicPrediction given as the node. Its reliability is from now,
pred.sf(age + t); its lifetimes pred.qf(u) - age; its mean the unit's
mean life left. A NodeState with another age than the prediction's is
refused, as it would condition the unit again. A RepairableRBD and a
NonRepairable refuse a joint model: the units after the first are new,
without its readings. It saves with the diagram (the model in surpyval's
format and the unit's inputs).

surpyval 0.25 is required, for its joint models.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019Km2eWBiPJ5JNkme3vRg4B
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