Build a TypeScript module that predicts future item requests from a partner organization so banks can proactively stock inventory.
forecastDemand(
partnerId: string,
itemId: string,
horizon: 30 | 60 | 90 // days ahead to forecast
): Promise<ForecastResult>
// ForecastResult: {
// predicted: { month: string, units: number, confidence: 'high' | 'medium' | 'low' }[],
// seasonalityDetected: boolean,
// dataPointsUsed: number
// }
Algorithm:
S_t = α * x_t + (1 - α) * S_{t-1}seasonalityDetected: trueWrite unit tests for 3 scenarios:
No contributions yet.