Skip to main content

detectStructuralBreak

chainalign-backend


chainalign-backend / services/EdgeCaseDetectionService / detectStructuralBreak

Function: detectStructuralBreak()

detectStructuralBreak(demandHistory, threshold): boolean

Defined in: services/EdgeCaseDetectionService.js:24

Detect structural breaks using CUSUM (Cumulative Sum) algorithm A structural break indicates a significant change in demand level or pattern

Parameters

demandHistory

number[]

Historical demand values

threshold

number = 3.5

Threshold for detecting break (default: 3.5)

Returns

boolean

True if structural break detected