Repository navigation
feat(spo2): nightly 5/MG SpO2 candidate as the mean of per-window medians (experimental) - #2825
Open
LeonardSEO wants to merge 1 commit into
Open
LeonardSEO wants to merge 1 commit into
LeonardSEO wants to merge 1 commit into
Conversation
…ians Byte 82 is measured in 30 s windows every 1,200 s during sleep (LeonardSEO/wearable5.0 FINDINGS §13). Each window with at least 5 in-band seconds yields its median; the night is the mean of those medians. Display-only and still default-off; not claimed as an improvement. Refs ryanbr#103
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Experimental, like the candidate itself. The method follows one captured night; I do not expect it to be accepted as an improvement, and it is not described as one.
What this PR does
Changes how the nightly 5/MG SpO2 candidate (
spo2_candidate_82) is aggregated. Display-only, behind the existing default-off toggle; it never writesspo2Pctand feeds nothing.samplesis now the in-band seconds of the windows that counted.Why: in an overnight iOS capture, byte 82 is 0 in every record except 15 windows of exactly 30 s starting exactly every 1,200 s, all during sleep. Several windows hold only 1-4 valid seconds (one a lone 78 % among status codes). A per-second mean weighs those thin windows like full ones, which may explain part of the split cross-device evidence noted at the candidate. That is a hypothesis until a captured night is compared with the official app's own SpO2.
Source: LeonardSEO/wearable5.0, FINDINGS §13 (
spo2_windows).Validation: none beyond that one night (7 windows of 93-99 %). No held-out number, so per
docs/VALIDATION_PROTOCOL.mdthis is not claimed as an improvement.Type of change
How it was tested
Spo2CandidateNightlyTests/Spo2CandidateNightlyTest, rewritten with the same fixtures on both platforms: window median, mean of medians, status codes and thin windows ignored, a gap splitting windows, session bounds, band edges.swift testinPackages/StrandAnalytics: 2141 tests pass../gradlew testFullDebugUnitTest: 6686 tests, all pass apart from the 2RecoveryDriversTesthalf-tie cases that fail the same way on unmodifiedmain.Tools/i18n_audit.py --ci,Tools/doc_comment_lint.py,docs/protocol-exampleschecks andTools/parity_ledger.py --refresh-derived(derived snapshots included): pass.Toolsunit tests, the parity acceptance suite and the R-R contract: pass apart from the 4test_check_source_referencescases (/varvs/private/vartemp path on macOS) that fail the same way on unmodifiedmain.Strand) builds with this change on my development branch;StrandTestsand the iOS target were not run locally for this branch.app-build.ymlcovers both.Checklist
android/(apart from the 2RecoveryDriversTesthalf-tie cases that fail the same way on unmodifiedmain)StrandDesign/Palette/Metricstokensdocs/CONTRIBUTING.mdStrand.xcodeproj/) or any secrets/keystoresRelated issues
Refs #103
🤖 Generated with Claude Code