https://github.com/PaddlePaddle/PaddleTS/blob/18accdedae896405a4d245b084655fbb1fdfd10a/paddlets/models/data_adapter.py#L961
data_adapter的_validate_known_cov_timeseries方法RangeIndex是不是逻辑上面有问题 else: # RangeIndex # Note: RangeIndex.stop is right-opened, but time_window is right-closed, so stop param must + 1. step = self._std_timeindex.step exceeded_timeindex = pd.RangeIndex( start=self._std_timeindex[-1], stop=(self._time_window[1] + 1) * step, step=step ) sample_end_std_time = exceeded_timeindex[-1] start=self._std_timeindex[-1]的取值为什么取的是RangeIndex的stop值,导致exceeded_timeindexs的size为0,sample_end_std_time = exceeded_timeindex[-1]这行代码报IndexError: index -1 is out of bounds for axis 0 with size 0
stop=(self._time_window[1] + 1) * step,看了下这个self._time_window的取值逻辑,知道问题在哪里了,start取的是RangeIndex的stop值(self._std_timeindex[-1]),self._time_window的取值是(len(tsdataset.get_target().data) - 1 + self._skip_chunk_len + self._out_chunk_len),如果我的测试数据集的索引值不是从0开始的自增的话,会导致start>stop
raise_if_not(
known_cov_ts.start_time <= sample_start_std_time <=
sample_end_std_time <= known_cov_ts.end_time,
f"The inequality must hold: " +
f"TSDataset.known_cov.start_time ({known_cov_ts.start_time}) <= "
+ f"TSDataset.{self._std_timeseries_name}.time_index" +
f"[(time_window[0] - out_chunk_len - skip_chunk_len - in_chunk_len + 1)] "
+ f"({sample_start_std_time}) <= " +
f"TSDataset.{self._std_timeseries_name}.time_index[time_window[1]] "
+ f"({sample_end_std_time}) <= " +
f"TSDataset.known_cov.end_time ({known_cov_ts.end_time}).")
这里known_cov.end_time要大于sample_end_std_time?那是意思known_cov的索引值是要大于预测时间索引值吗?
您好,因为known_cov是未来已知协助变量,所以是要大于历史的结束时最后一个时间节点。
您好,由于问题超过一周,将自动关闭。