ibspan.ecap.merchant.shopdecisions.forecasting
Class FixedHorizonEstimator

java.lang.Object
  extended by ibspan.ecap.merchant.shopdecisions.forecasting.FixedHorizonEstimator
All Implemented Interfaces:
HorizonEstimator

public class FixedHorizonEstimator
extends java.lang.Object
implements HorizonEstimator


Constructor Summary
FixedHorizonEstimator(int defaultHorizonLength)
           
 
Method Summary
 int estimateHorizon(java.lang.String productId, java.util.Date forecastStart)
          Returns the forecast period length (in days) for the prediction of the given product starting at the specified date.
 void setProductHorizon(java.lang.String productId, int horizonLength)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FixedHorizonEstimator

public FixedHorizonEstimator(int defaultHorizonLength)
Method Detail

setProductHorizon

public void setProductHorizon(java.lang.String productId,
                              int horizonLength)

estimateHorizon

public int estimateHorizon(java.lang.String productId,
                           java.util.Date forecastStart)
Description copied from interface: HorizonEstimator
Returns the forecast period length (in days) for the prediction of the given product starting at the specified date.

Specified by:
estimateHorizon in interface HorizonEstimator
Parameters:
productId - the id of the product whose sales are forecasted
forecastStart - the date when the forecast starts
Returns:
the forecast period length (in days) to use for the prediction