def shuffleTrainValidateTest(InterpolatedStep, path, fileName, R, testRate=0.2):
    TIMESTEP = (InterpolatedStep * 2)
    Sequence = []
    for i in range((R.shape[0] - TIMESTEP)):
        Sequence.append(R[i:(i + TIMESTEP), :, :, :])
    Sequence = np.array(Sequence, dtype='int32')
    INDEX = list(range(len(Sequence)))
    np.random.shuffle(INDEX)
    np.random.shuffle(INDEX)
    np.random.shuffle(INDEX)
    trainINDEX = INDEX[:int((len(INDEX) * (1 - testRate)))]
    testINDEX = INDEX[int((len(INDEX) * (1 - testRate))):]
    train = Sequence[trainINDEX]
    test = Sequence[testINDEX]
    np.save(((path + 'train_') + fileName), train)
    np.save(((path + 'test_') + fileName), test)
    print(train.shape, test.shape)
def shuffleTrainValidateTest(InterpolatedStep, path, fileName, R, testRate=0.2):
    TIMESTEP = (InterpolatedStep * 2)
    Sequence = []
    for i in range((R.shape[0] - TIMESTEP)):
        Sequence.append(R[i:(i + TIMESTEP), :, :, :])
    Sequence = np.array(Sequence, dtype='int32')
    INDEX = list(range(len(Sequence)))
    np.random.shuffle(INDEX)
    np.random.shuffle(INDEX)
    np.random.shuffle(INDEX)
    trainINDEX = INDEX[:int((len(INDEX) * (1 - testRate)))]
    testINDEX = INDEX[int((len(INDEX) * (1 - testRate))):]
    train = Sequence[trainINDEX]
    test = Sequence[testINDEX]
    np.save(((path + 'train_') + fileName), train)
    np.save(((path + 'test_') + fileName), test)
    print(train.shape, test.shape)