Accumulates a time series of dated observations and builds an AnomalyDetectionModel or ForecastModel from them. Obtained via ChartManager.newRegressionBuilder(String), typically reached from JS via services.chartManager. Add observations with addData(Date, double) in chronological order, then call buildAnomalyDetector() or buildForecaster() to analyse or forecast the series.

Group: Builders


Methods

addData(Date x, double y)

Returns: RegressionBuilder

Adds one dated observation to this builder's data set. Observations should be added in chronological order, since forecasting and anomaly detection treat the accumulated list as a time-ordered series indexed by the order data points were added.

ParameterDescription
xthe observation's date; must not be null
ythe observed value at that date

withFrequency(Frequency f)

Returns: RegressionBuilder

Sets the frequency at which forecast periods are generated by buildForecaster(); has no effect on anomaly detection.

ParameterDescription
fthe forecast period frequency

withFrequency(String f)

Returns: RegressionBuilder

Sets the forecast frequency by name; see withFrequency(Frequency) for how it is used.

ParameterDescription
fthe frequency name, matching a ChartManager.Frequency constant such as DAILY or MONTHLY

buildAnomalyDetector(Date anomalyStartDate)

Returns: AnomalyDetectionModel

Builds and trains an AnomalyDetectionModel from the observations added so far.

ParameterDescription
anomalyStartDatethe date after which anomalies are looked for

buildForecaster(Date predictionEndDate)

Returns: ForecastModel

Builds and trains a ForecastModel from the observations added so far, forecasting forward to the given end date at the frequency set via withFrequency().

ParameterDescription
predictionEndDatethe date to forecast up to
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.