cpdbench.examples.ExampleDatasets
1import pathlib 2 3import numpy as np 4 5from cpdbench.dataset.CPD2DFromFileDataset import CPD2DFromFileDataset 6from cpdbench.dataset.CPDNdarrayDataset import CPDNdarrayDataset 7 8 9def get_extreme_large_dataset_from_file(validation_amount=-1): 10 path = pathlib.Path(__file__).parent.resolve() 11 path = path.joinpath("data", "very_big_numpy_file.dat") 12 dataset = CPD2DFromFileDataset(str(path), "float32", [5, 245, 255, 256, 25], validation_amount) 13 return dataset 14 15 16def dataset_get_apple_dataset(): 17 raw_data = np.load("data/apple.npy") 18 timeseries = raw_data[:, 0] 19 reshaped_ts = np.reshape(timeseries, [1, timeseries.size]) 20 return CPDNdarrayDataset(reshaped_ts, [337]) 21 22 23def dataset_get_bitcoin_dataset(): 24 raw_data = np.load("data/bitcoin.npy") 25 timeseries = raw_data[:, 0] 26 reshaped_ts = np.reshape(timeseries, [1, timeseries.size]) 27 return CPDNdarrayDataset(reshaped_ts, [569])
def
get_extreme_large_dataset_from_file(validation_amount=-1):
def
dataset_get_apple_dataset():
def
dataset_get_bitcoin_dataset():