Skip to main content

detectDataQualityIssues

chainalign-backend


chainalign-backend / services/EdgeCaseDetectionService / detectDataQualityIssues

Function: detectDataQualityIssues()

detectDataQualityIssues(params): boolean

Defined in: services/EdgeCaseDetectionService.js:247

Detect data quality issues

Issues include:

  • High percentage of missing values (> 20%)
  • High percentage of outliers (> 10%)
  • Stale data (last update > 30 days ago)

Parameters

params

demandHistory

number[]

Historical demand (may contain nulls)

lastUpdated

Date

Timestamp of last data update

missingThreshold

number = 0.2

Threshold for missing values (default: 0.2)

outlierThreshold

number = 0.1

Threshold for outliers (default: 0.1)

stalenessThreshold

number = 30

Days threshold for staleness (default: 30)

Returns

boolean

True if data quality issues detected