Skip to content
StatusImplementedData originSIMULATEDDERIVEDVerified on
Source of truthengine.tsconfig.ts

Overview & Methods Status ​

The health engine of the Astronaut Health Intelligence Platform (AHI) lives in frontend/web/src/engine/. It turns simulated device readings and check-ins into a status per metric, body region and astronaut, a transparent risk score, short forecasts, recommendations and alerts. It is pure TypeScript, runs in the browser and is unit tested with vitest.

Statistics first

Status, risk and alerts come only from classical statistics and explicit rules with an id. One experimental machine learning detector (a per astronaut Isolation Forest) adds an informational "Unusual combination" note and never changes a status. The optional Ask AHI assistant explains engine outputs and computes nothing. Why: AI and analytics approach.

Pipeline ​

StagePageCode
Personal normal per metric and contextPersonal baselinebaseline.ts
Acute deviation, drift, persistence, data qualityAnomaly detectionanomaly.ts
Combined rules, score, confidence, regionsRisk assessmentrisk.ts
Projection with interval, 24 h to 15 daysForecastingforecast.ts
Eye (SANS) and hearing examsEye health and hearingassess.ts
Mission profile, dose, space weatherMission profilesprofiles.ts
Experimental multivariate noteAnomaly detectionmultivariate.ts
Next steps, who can act, what-ifRecommendations, autonomy and what-ifrecommendations.ts
Alert lifecycle and escalationAlerts and escalationalerts.ts
Where the data comes fromDevice simulation and scenariosadapters.ts
Check-ins and communication delaySelf-report and Earth linkcomms.ts
Every fixed numberThresholds and limitationsconfig.ts

How the engine is wired into the app (clock, publishing, bounded memory) is in Engine and simulation architecture.

Versions ​

ComponentVersion string (in config.ts)
Engineahi-engine 2.0.0
Risk modelAHI transparent rules v2.0 (demo)
Baselinerobust-baseline v1 (median/MAD)
ForecastDamped Holt linear smoothing v1
Recommendation catalogrec-catalog v2.0
CUSUMTabular CUSUM on hourly mean robust z v1
Multivariate detectorahi-iforest-ts v1 (experimental, PCA whitened)

Versions are stored on every baseline, risk assessment, prediction and recommendation, so each output says which method produced it.

Methods status ​

The product spec (section 9.3) lists candidate methods. This table is the audit of that list against the code: statistics first, machine learning only where the statistics leave a gap, and then only as an experimental, informational layer.

MethodPurposeStatusWhere
Rolling robust baseline (median, MAD, p05 / p95, context buckets)Personal normalImplementedPersonal baseline
Robust z-scoreAcute deviation from the personal normalImplementedAnomaly detection
EWMA of zSlow, persistent driftImplementedAnomaly detection
Persistence windowsRepeated daily deviationsImplementedAnomaly detection
Data quality and stalenessMissing, stale or questionable dataImplementedAnomaly detection
Transparent rule based risk score 0 to 100Attention levelImplementedRisk assessment
Damped Holt linear smoothing with 80% intervalShort term projectionImplementedForecasting
Band exit and recovery ruleTime until leaving the normal rangeImplementedForecasting
Deterministic noise free what-if projectionDiscussion of an actionExperimentalRecommendations
Moving average / rolling medianSmoothingImplemented 30 min window means feed forecasts; the acute check uses a rolling median of 3 readingsForecasting
IQR ruleOutlier detectionNot implemented robust z covers it
CUSUMSmall but steady shifts that stay under the EWMA ruleImplemented Watch onlyAnomaly detection
Isolation ForestUnusual combination of several signalsExperimental per astronaut, informational only, spec US-019Anomaly detection
ARIMATime series forecastingNot implementedAI and analytics
XGBoostRisk from a labeled datasetNot implemented no labeled dataAI and analytics
SHAPModel explanationNot implemented rules explain themselvesAI and analytics
Survival analysisTime to eventNot implemented

Design principles ​

  • Personal first. Status compares each person with their own baseline; fixed thresholds are a demo safety net.
  • Explainable by construction. Every hit has a rule id, a plain-language label and a weight; the score formula is public. The experimental detector lists its top contributing signals.
  • Missing is not normal. No valid value within a stale window is NO_DATA, and it lowers confidence.
  • Bounded and streaming. O(1) work per sample per metric; histories and logs have caps.
  • Deterministic. Seeded simulation; the same seed gives the same results (tested).

Next steps ​

Astronaut Health Intelligence Platform. Decision support only: not a diagnosis and not a medical device. Device data is simulated.