所以我的时间序列长度为324。我想随机选择60
每次迭代的连续时间步长
例如。对于i = 1选择3:74,对于I = 2选择255:314,以此类推千位
时间。
答案 0 :(得分:0)
r
。r
至r+60
示例:
import numpy as np
sampleSize = 60
timeSeries = np.random.random((324, 5, 5)) # exchange this with your real data
r = np.random.randint(0, timeSeries.shape[0]-sampleSize+1)
sample = timeSeries[r:r+60]