stresspy
GEOMETRIC STRESS CRITERION

See the geometry
behind model error.

A model’s error has a direction.
StressPy helps you understand what it means.

Separate discrepancy aligned with locally parameter-accessible directions from discrepancy orthogonal to them. Add a geometric diagnosis to your scientific modelling workflow.

PYTHON TOOLKIT DIFFERENTIABLE MODELS LOCAL GEOMETRY
BEYOND ERROR MAGNITUDE

How far does a model miss? And in which directions?

01 / THE FRAMEWORK

From fit to understanding.

Conventional metrics summarise fit or compare models. StressPy adds a local geometric view of the discrepancy.

01 / RESIDUAL GEOMETRYSCHEMATIC
Local tangent and normal geometryA soft green curved model surface with a translucent tangent plane at the model prediction. A teal tangent residual and a violet normal residual sum to the grey total residual ending at the observed response. Illustrative geometry, not measured data.Observed responseModel predictionr∥ · tangentr⊥ · normalr · residualLocal tangent plane
Parameter-accessible Orthogonal component
PARAMETER-ACCESSIBLE

Tangent stress r∥

The part of the residual aligned with directions the model can produce through small parameter changes.

Could parameter adjustment help locally?
ORTHOGONAL TO LOCAL DIRECTIONS

Normal stress r⊥

The part of the residual outside those directions at the evaluated parameter point, under the chosen weighting and numerical rank.

What remains outside local parameter reach?
INTERPRET WITH CARE

This is a local diagnosis. Normal stress alone does not establish global structural inadequacy, and tangent accessibility does not guarantee a useful finite nonlinear repair. Calibration and repair checks help interpret the result.

02 / THE TOOLKIT

One decomposition.
A richer diagnostic picture.

Built around the weighted Jacobian and singular value decomposition, with diagnostics that connect geometry to model behaviour.

01

Tangent & normal stress

Quantify the two residual components and the normal fraction of total discrepancy.

DECOMPOSITION
02

Numerical rank

Inspect the dimension of the model’s locally accessible response space.

LOCAL GEOMETRY
03

Observational weighting

Account for observational uncertainty, with standard deviations and variance floors.

UNCERTAINTY
04

Calibration

Use bootstrap or Monte Carlo reference distributions to put stress in context.

REFERENCE DISTRIBUTIONS
05

Repair directions

Compute a minimum-norm local parameter correction associated with the accessible component.

PARAMETER ADJUSTMENT
06

Nonlinear repair checks

Evaluate steps along a repair direction to examine whether the actual nonlinear model improves.

LOCAL → FINITE
03 / GET STARTED

Bring geometry to
your Python workflow.

Install StressPy, then follow the package documentation for the interface and examples available in your installed release.

Package & documentation
TERMINALPython / pip
$ pip install stresspy

# A typical diagnostic workflow

  1. 01 Supply model predictions and observations
  2. 02 Construct the Jacobian and choose weights
  3. 03 Decompose, calibrate, and inspect repair
Installation command · view PyPI for release details
04 / RESEARCH CONTEXT

A geometric lens on
scientific models.

StressPy implements diagnostics developed around the Geometric Stress Criterion (GSC): examining model–data discrepancy relative to a model’s locally accessible response directions.

The construction applies to differentiable model responses, including ODE models. It complements measures such as RMSE and model-selection criteria such as AIC and BIC.

For software documentation, release details, and licensing terms, visit the StressPy package page ↗.