Represents a single dated observation: a value at a point in time, with an index used as the independent variable for forecasting. Used both as a line chart data point via ChartManager.ChartBuilder.addXY(Date, Number) and as the observation type shared by RegressionBuilder, ForecastModel and AnomalyDetectionModel. A point produced by ForecastModel.predictions() has isPredicted() set to true rather than being an actual observation.
Implements: DataPoint, DataPoint
Properties
| Property | Returns | Description |
|---|---|---|
| date | Date | Date this observation was recorded at, or the forecast period's date for a predicted point. |
| dependentValue | double | Value of this point, as required by openforecast's DataPoint interface; equivalent to getValue(). |
| independentVariableNames | String[] | Names of the independent variables used by openforecast when fitting a model against this point. Always a single-element array, since only one independent variable ("x") is used. |
| predicted | boolean | Whether this point is a forecast produced by ForecastModel.predictions(), rather than an actual observation. |
| value | double | Observed value at this point, or the forecast value for a predicted point. |
Methods
getDate()
Returns: Date
Date this observation was recorded at, or the forecast period's date for a predicted point.
getValue()
Returns: double
Observed value at this point, or the forecast value for a predicted point.
getDependentValue()
Returns: double
Value of this point, as required by openforecast's DataPoint interface; equivalent to getValue().
getIndependentVariableNames()
Returns: String[]
Names of the independent variables used by openforecast when fitting a model against this point. Always a single-element array, since only one independent variable ("x") is used.
isPredicted()
Returns: boolean
Whether this point is a forecast produced by ForecastModel.predictions(), rather than an actual observation.