WDCLS Invert Sigmoid Rule
Version: v3.0.0 Status: Normative (text), Illustrative (diagrams only) Scope: WDCLS_INVERT_SIGMOID_POS rule for validating CLS discrepancies with sigmoid curve awareness Domain: RULES-WDCLSINVSIG Precedence: Shares base logic pattern with WDCLS Rule
Statement
The system shall validate CLS (classification) discrepancies between DXAI and machine classifications while considering sigmoid curve patterns, applying intelligent skip conditions that recognize valid scenarios where discrepancy checks should be bypassed.
The rule evaluates three skip conditions in order: minimum fluorescence threshold, maximum CT threshold, and sigmoid pattern combined with classification. A downward sigmoid pattern with negative classification represents a coherent case where the curve shape matches the classification outcome, and thus should not trigger a discrepancy error.
Quick Reference
| ID | Core Behavior | Priority | Status |
|---|---|---|---|
| REQ-RULES-WDCLSINVSIG-001 | Skip discrepancy check for downward sigmoid + negative classification | HIGH | Draft |
| REQ-RULES-WDCLSINVSIG-002 | Skip discrepancy check when CT exceeds max threshold | HIGH | Draft |
| REQ-RULES-WDCLSINVSIG-003 | Skip rule when max reading below min fluorescence | HIGH | Draft |
Key Integration Points: Analytics Engine, Well Observation Data, Target Configuration, WDCLS Rule (base logic)
Rule Summary
| Property | Value |
|---|---|
| Name | WDCLS_INVERT_SIGMOID_POS |
| Triggers | When DXAI cls != machine cls |
| Skip Conditions | Min fluorescence, Max CT, Downward sigmoid + Negative cls |
| Output | CLS discrepancy error (or skip) |
Rule Flowchart (Illustrative)
This diagram illustrates the skip condition evaluation order. The "invert" designation refers to recognizing downward sigmoid with negative classification as a valid (inverted from normal expectation) pattern.
Definitions
| Term | Definition |
|---|---|
| CLS Discrepancy | A condition where the DXAI classification differs from the machine classification for an observation |
| Sigmoid Direction | The curve shape pattern (Upward or Downward) determined by comparing middle and penultimate reading values |
| Downward Sigmoid | A sigmoid curve pattern where the middle value exceeds the penultimate value |
| Upward Sigmoid | A sigmoid curve pattern where the penultimate value exceeds the middle value |
| Final Classification | The resolved classification outcome for an observation (Positive or Negative) |
| Final CT | The cycle threshold value determined for an observation |
| Maximum Fluorescence Reading | The highest fluorescence value in an observation's readings array |
Assumptions
- The rule only evaluates observations where a CLS discrepancy exists (DXAI cls != machine cls)
- Sigmoid direction is determinable from observation readings with at least 4 data points
- Target configuration parameters are available when the rule executes
- The WDCLS Invert Sigmoid Rule follows the same base logic pattern as the standard WDCLS Rule
Requirements
Sigmoid Pattern Skip Condition (REQ-RULES-WDCLSINVSIG-001)
FR-WDCLSINVSIG-001: Skip CLS Discrepancy Check for Downward Sigmoid with Negative Classification
The system shall skip the CLS discrepancy check for observations with downward sigmoid readings and negative final classification, and shall apply a CLS discrepancy error for all other sigmoid pattern and classification combinations.
Acceptance Criteria
Skip Condition (Both Must Be Met):
- When final cls is negative AND readings exhibit downward sigmoid pattern, do NOT apply CLS discrepancy error
- The skip condition applies ONLY when BOTH conditions are met: downward sigmoid AND negative classification
- The system recognizes downward sigmoid with negative classification as valid (inverted from normal expectation)
Error Application (Any Other Combination):
- When final cls is negative AND readings exhibit upward sigmoid pattern, apply CLS discrepancy error
- When final cls is positive AND readings exhibit downward sigmoid pattern, apply CLS discrepancy error
- When final cls is positive AND readings exhibit upward sigmoid pattern, apply CLS discrepancy error
Sigmoid Determination:
- Require at least 4 readings in the observation to determine sigmoid direction
- If readings count < 4, sigmoid direction cannot be determined
Trace: Source: 3.0.0-WDCLS Invert Sigmoid Rule (Row 1, Row 2 Cases 1-4) | Jira: BT-5214 | X-ray: BT-5221 | Tests: See scenarios | Related: WDCLS Rule (base logic pattern)
CT Threshold Skip Condition (REQ-RULES-WDCLSINVSIG-002)
FR-WDCLSINVSIG-002: Skip CLS Discrepancy Check When Final CT Exceeds Maximum Threshold
The system shall skip the CLS discrepancy check when the observation's final CT value meets or exceeds the configured maximum CT for CLS discrepancy threshold.
Acceptance Criteria
Threshold Comparison:
- When max_ct_for_cls_discrepancy is configured and final_ct >= threshold, skip the discrepancy check
- When max_ct_for_cls_discrepancy is null, proceed with the discrepancy check normally
Configuration Behavior:
| max_ct_for_cls_discrepancy | final_ct | Result |
|---|---|---|
| null | any | Proceed with check |
| 35 | 36 | Skip (36 > 35) |
| 36 | 36 | Skip (36 >= 36) |
| 37 | 36 | Proceed (36 < 37) |
Shared Configuration:
- This configuration option is shared with WDCLS/C Rules
Trace: Source: 3.0.0-WDCLS Invert Sigmoid Rule (Row 3 Cases 1-4) | Jira: BT-5227 | Tests: See scenarios | Related: WDCLS/C Rules (shared configuration)
Minimum Fluorescence Skip Condition (REQ-RULES-WDCLSINVSIG-003)
FR-WDCLSINVSIG-003: Skip Rule When Maximum Reading Below Minimum Fluorescence Threshold
The system shall skip the WDCLS Invert Sigmoid rule when the maximum reading in the observation is less than the configured minimum fluorescence to positive threshold.
Acceptance Criteria
Threshold Comparison:
- When max(readings) < minimum_fluorescence_to_positive, skip the rule entirely
- When max(readings) >= minimum_fluorescence_to_positive, execute the rule and apply errors if other conditions are satisfied
Rationale:
- Low-fluorescence curves may not have sufficient signal to produce reliable classifications
- This is a sub-rule that applies to WD (Well Discrepancy) rules generally
Trace: Source: 3.0.0-WDCLS_INVERT_SIGMOID_POS: Consider Minimum Fluorescence in WD Rules (Row 1 Cases 1-2) | Epic: BT-5367 | Jira: BT-5368 | Tests: See scenarios | Related: WD Rules (shared sub-rule behavior)
Configuration Options
| Option | Default | Description | Affects |
|---|---|---|---|
max_ct_for_cls_discrepancy | null | Maximum CT value threshold for CLS discrepancy checks; when null, check proceeds normally | REQ-RULES-WDCLSINVSIG-002 |
minimum_fluorescence_to_positive | null | Minimum fluorescence threshold; rule skipped when max reading is below this value | REQ-RULES-WDCLSINVSIG-003 |
Implementation (Illustrative)
| Component | Location |
|---|---|
| Rule Class | Analyzer/Rules/WdclsInvertSigmoidPosRule |
Traceability Matrix
| Requirement | Title | Verification | Implementation | Test Cases | Status |
|---|---|---|---|---|---|
| REQ-RULES-WDCLSINVSIG-001 | Skip CLS Discrepancy for Downward Sigmoid + Negative | Test | WdclsInvertSigmoidPosRule | 4 scenarios | Draft |
| REQ-RULES-WDCLSINVSIG-002 | Skip Discrepancy When CT Exceeds Max Threshold | Test | WdclsInvertSigmoidPosRule | 4 scenarios | Draft |
| REQ-RULES-WDCLSINVSIG-003 | Skip Rule When Max Reading Below Min FL | Test | WdclsInvertSigmoidPosRule | 2 scenarios | Draft |
Notes
- Programmatic rule code: WDCLS_INVERT_SIGMOID_POS
- This rule follows the same base logic pattern as the WDCLS Rule
- The rule implements three skip conditions evaluated in order: minimum fluorescence, max CT, sigmoid pattern
- A downward sigmoid pattern combined with a negative classification represents a coherent case where the curve shape matches the classification outcome
- High CT values indicate late amplification cycles where classification reliability decreases
- Related Epic BT-5215: Resolve Quest invalid sigmoid issues - Add wdcls-invert-sigmoid-pos rule
Sigmoid Direction Determination (Illustrative)
For a readings array of length n:
- Middle index: floor(n / 2)
- Penultimate index: n - 2
- Downward: middle_value > penultimate_value
- Upward: middle_value < penultimate_value
- Not a sigmoid: middle_value == penultimate_value OR n < 4
Acceptance Tests
Test: REQ-RULES-WDCLSINVSIG-001
Test: Downward sigmoid with negative classification skips discrepancy check
Given: A well with observation where DXAI cls != machine cls
And: The observation has final classification: negative
And: The observation readings exhibit downward sigmoid pattern
When: The WDCLS Invert Sigmoid rule evaluates the observation
Then: The observation shall NOT receive a CLS discrepancy error
Test: Upward sigmoid with negative classification applies discrepancy error
Given: A well with observation where DXAI cls != machine cls
And: The observation has final classification: negative
And: The observation readings exhibit upward sigmoid pattern
When: The WDCLS Invert Sigmoid rule evaluates the observation
Then: The observation SHALL receive a CLS discrepancy error
Test: Downward sigmoid with positive classification applies discrepancy error
Given: A well with observation where DXAI cls != machine cls
And: The observation has final classification: positive
And: The observation readings exhibit downward sigmoid pattern
When: The WDCLS Invert Sigmoid rule evaluates the observation
Then: The observation SHALL receive a CLS discrepancy error
Test: Upward sigmoid with positive classification applies discrepancy error
Given: A well with observation where DXAI cls != machine cls
And: The observation has final classification: positive
And: The observation readings exhibit upward sigmoid pattern
When: The WDCLS Invert Sigmoid rule evaluates the observation
Then: The observation SHALL receive a CLS discrepancy error
Test: REQ-RULES-WDCLSINVSIG-002
Test: Null configuration applies discrepancy check
Given: A well with observation where DXAI cls != machine cls
And: The target has max_ct_for_cls_discrepancy: null
And: The observation has final CT: 36
When: The WDCLS Invert Sigmoid rule evaluates the observation
Then: The well SHALL receive a discrepancy error (configuration allows check)
Test: Final CT exceeds max threshold skips check
Given: A well with observation where DXAI cls != machine cls
And: The target has max_ct_for_cls_discrepancy: 35
And: The observation has final CT: 36
When: The WDCLS Invert Sigmoid rule evaluates the observation
Then: The well shall NOT receive a discrepancy error (36 > 35)
Test: Final CT equals max threshold skips check
Given: A well with observation where DXAI cls != machine cls
And: The target has max_ct_for_cls_discrepancy: 36
And: The observation has final CT: 36
When: The WDCLS Invert Sigmoid rule evaluates the observation
Then: The well shall NOT receive a discrepancy error (36 >= 36)
Test: Final CT below max threshold applies check
Given: A well with observation where DXAI cls != machine cls
And: The target has max_ct_for_cls_discrepancy: 37
And: The observation has final CT: 36
When: The WDCLS Invert Sigmoid rule evaluates the observation
Then: The well SHALL receive a discrepancy error (36 < 37)
Test: REQ-RULES-WDCLSINVSIG-003
Test: Max reading below threshold skips rule
Given: A well with observation and target
And: The target has minimum fluorescence to positive: 100
And: The observation readings have maximum value: 99
When: The WDCLS Invert Sigmoid rule evaluates the observation
Then: The rule shall be skipped entirely (99 < 100)
Test: Max reading at or above threshold executes rule
Given: A well with observation and target
And: The target has minimum fluorescence to positive: 100
And: The observation readings have maximum value: 100
When: The WDCLS Invert Sigmoid rule evaluates the observation
Then: The rule shall execute and apply errors if other conditions are satisfied (100 >= 100)
Appendix: Process Artifacts
Completion Checklist
- All requirements are capability-level (describe behavior, not UI)
- Requirement variants consolidated (no requirement explosion) - N/A, distinct capabilities preserved
- UI details are fully demoted to Illustrative section
- Configuration options are not encoded as requirements
- Acceptance criteria describe behavior, not UI mechanics
- Every requirement has acceptance criteria and source traceability
- Error handling addressed for I/O, validation, and external system requirements - N/A, analytics rule
- Open questions documented with owners assigned - None identified
- Consolidations documented in Reviewer Notes with reversibility info
- Module can survive a full UI redesign unchanged
- Refinements folded into Acceptance Criteria
- Traceability matrix is complete
Reviewer Notes
No Consolidation Applied
All 3 requirements from the source file were preserved as individual requirements:
| Original Item | Disposition | Rationale |
|---|---|---|
| REQ-RULES-WDCLSINVSIG-001 | Preserved | Distinct capability: sigmoid pattern-based skip condition |
| REQ-RULES-WDCLSINVSIG-002 | Preserved | Distinct capability: CT threshold-based skip condition |
| REQ-RULES-WDCLSINVSIG-003 | Preserved | Distinct capability: minimum fluorescence-based skip condition |
Rationale: Per RULES domain guidance, conservative consolidation was applied. Each requirement represents a distinct skip condition with unique evaluation criteria and test scenarios. Analytics rules require precise behavioral specifications, and these three capabilities operate independently with different configuration parameters.
Reversibility: Source file preserved at:
- Source:
output/pilot/rules/rule-wdcls-invert-sigmoid/rule-wdcls-invert-sigmoid-restructured.md