You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As declared by this interface, the interval of Metric should be in seconds.
However, in subsequent use, the modification of timestamp values based on collectionInterval was not consistent.
@Override
public List<DataPoint> forecast(int nAhead) {
List<DataPoint> result = new ArrayList<>(nAhead);
for (int i = 1; i <= nAhead; i++) {
PredictionResult predictionResult = calculatePrediction(i, null, null);
DataPoint predictedPoint = new DataPoint(predictionResult.value,
lastTimestamp + i*metricContext.getCollectionInterval()*1000,
predictionResult.value + predictionIntervalMultiplier*predictionResult.sdOfResiduals,
predictionResult.value - predictionIntervalMultiplier*predictionResult.sdOfResiduals);
result.add(predictedPoint);
}
return result;
}
In this interface implementation, lastTimestamp+i * metricContext. getCollectionInterval() * 1000 is used to calculate the timestamp of the prediction point, indicating that Timestamp is measured in milliseconds.
However, in the subsequent calculation of the timestamp, the CollectionInterval was directly added without converting it to a timestamp in milliseconds.
I am puzzled by the above phenomenon and hope to help answer it. If there is indeed an inconsistency issue, I am willing to assist with the modification.
The text was updated successfully, but these errors were encountered:
As declared by this interface, the interval of Metric should be in seconds.
However, in subsequent use, the modification of timestamp values based on collectionInterval was not consistent.
In this interface implementation,
lastTimestamp+i * metricContext. getCollectionInterval() * 1000
is used to calculate the timestamp of the prediction point, indicating that Timestamp is measured in milliseconds.However, in the subsequent calculation of the timestamp, the CollectionInterval was directly added without converting it to a timestamp in milliseconds.
I am puzzled by the above phenomenon and hope to help answer it. If there is indeed an inconsistency issue, I am willing to assist with the modification.
The text was updated successfully, but these errors were encountered: