HaoUNSW / PISA

106 stars 16 forks source link

Datasets: how can i find the data xxx.npy #3

Open lizonglingo opened 6 months ago

lizonglingo commented 6 months ago

The data in such function:

def generate_numerical(raw_folder, save_path, mode="test", obs_length=15):
    raw_data = np.load(os.path.join(raw_folder, "sg_raw_" + mode + ".npy"))
    data_x = []
    data_y = []
    for i in range(len(raw_data)):
        data = raw_data[i]
        number_of_instance = len(data) - obs_length
        for j in range(number_of_instance):
            y = data[obs_length + j]
            x = data[j: obs_length + j]
            data_x.append(x)
            data_y.append(y)

    data_x = np.reshape(data_x, [-1, obs_length])
    np.save(os.path.join(save_path, mode + "_" + str(obs_length) + "_x.npy"), data_x)
    data_y = np.reshape(data_y, [-1, 1])
    np.save(os.path.join(save_path, mode + "_" + str(obs_length) + "_y.npy"), data_y)

named xxx.npy

xuehaouwa commented 6 months ago

Hi @lizonglingo

This part is used to run the numerical forecasting models (e.g., informer etc.).

I will upload the processed npy files soon. (sorry, I am currently on annual leave :) )

2001chen010904 commented 4 months ago

@lizonglingo Do you get the npy data?

HaoUNSW commented 3 months ago

Hi, I have uploaded the npy files for the numerical based forecasting. In that Google drive link, each subset folder has a folder named Autoformer, and it contains the npy files.