darts icon indicating copy to clipboard operation
darts copied to clipboard

[QUESTION][BUG] Metric computation error

Open Dimot322 opened this issue 3 years ago • 2 comments

Hi! I'm trying to compute RMSE for algorithm and keep getting ValueError: The time series array must not be empty. I've checked all my preds and test series and they seem not to be empty. My predictions and test data have the same length and dimensionality (two rows, five columns) Any suggestions?

Dimot322 avatar Jun 06 '22 14:06 Dimot322

Do they share the same time index? The metrics extract the overlapping part (non-empty) of the target and prediction indices in order to compute the metric.

If below line raises an error, it means that the two series don't have any overlapping indices

series1.slice_intersect(series2)

Also helpful:

  • You can check a TimeSeries' time index with series.time_index.
  • You can check which index of series1 is in series2 with: series1.time_index.isin(series2.time_index)

dennisbader avatar Jun 09 '22 08:06 dennisbader

Do they share the same time index? The metrics extract the overlapping part (non-empty) of the target and prediction indices in order to compute the metric.

If below line raises an error, it means that the two series don't have any overlapping indices

series1.slice_intersect(series2)

Also helpful:

* You can check a TimeSeries' time index with `series.time_index`.

* You can check which index of series1 is in series2 with: `series1.time_index.isin(series2.time_index)`

Thanks, it helps

Dimot322 avatar Jun 14 '22 20:06 Dimot322