def writeTfRecords(trainPath, validationPath, testPath, binaryTrainPath, binaryValidationPath, binaryTestPath): tfrecord_writer = TFRecordWriter( input_size=model_kwargs['input_size'], output_size=model_kwargs['output_size'], train_file_path=trainPath, validate_file_path=validationPath, test_file_path=testPath, binary_train_file_path=binaryTrainPath, binary_validation_file_path=binaryValidationPath, binary_test_file_path=binaryTestPath) tfrecord_writer.read_text_data() if (binaryTrainPath): tfrecord_writer.write_train_data_to_tfrecord_file() if (binaryValidationPath): tfrecord_writer.write_validation_data_to_tfrecord_file() if (binaryTestPath): tfrecord_writer.write_test_data_to_tfrecord_file()
import os output_path = "../../../datasets/binary_data/M3/moving_window/" if not os.path.exists(output_path): os.makedirs(output_path) if __name__ == '__main__': # macro data tfrecord_writer = TFRecordWriter( input_size=12, output_size=18, train_file_path= '../../../datasets/text_data/M3/moving_window/m3_stl_monthly_macro_18i12.txt', validate_file_path= '../../../datasets/text_data/M3/moving_window/m3_stl_monthly_macro_18i12v.txt', test_file_path= '../../../datasets/text_data/M3/moving_window/m3_test_monthly_macro_18i12.txt', binary_train_file_path=output_path + 'm3_stl_monthly_macro_18i12.tfrecords', binary_validation_file_path=output_path + 'm3_stl_monthly_macro_18i12v.tfrecords', binary_test_file_path=output_path + 'm3_test_monthly_macro_18i12.tfrecords') tfrecord_writer.read_text_data() tfrecord_writer.write_train_data_to_tfrecord_file() tfrecord_writer.write_validation_data_to_tfrecord_file() tfrecord_writer.write_test_data_to_tfrecord_file() # micro data tfrecord_writer = TFRecordWriter(
from tfrecords_handler.moving_window.tfrecord_writer import TFRecordWriter import os output_path = "../../../datasets/binary_data/CIF_2016/moving_window/" if not os.path.exists(output_path): os.makedirs(output_path) if __name__ == '__main__': tfrecord_writer = TFRecordWriter( input_size = 15, output_size = 12, train_file_path = '../../../datasets/text_data/CIF_2016/moving_window/stl_12i15.txt', validate_file_path = '../../../datasets/text_data/CIF_2016/moving_window/stl_12i15v.txt', test_file_path = '../../../datasets/text_data/CIF_2016/moving_window/cif12test.txt', binary_train_file_path = output_path + 'stl_12i15.tfrecords', binary_validation_file_path = output_path + 'stl_12i15v.tfrecords', binary_test_file_path = output_path + 'cif12test.tfrecords' ) tfrecord_writer.read_text_data() tfrecord_writer.write_train_data_to_tfrecord_file() tfrecord_writer.write_validation_data_to_tfrecord_file() tfrecord_writer.write_test_data_to_tfrecord_file()
from tfrecords_handler.moving_window.tfrecord_writer import TFRecordWriter if __name__ == '__main__': tfrecord_writer = TFRecordWriter( input_size=120, output_size=12, train_file_path= '/home/rakshitha/PycharmProjects/temperature-forecasting/datasets/text_data/moving_window/with_stl_decomposition/temperature_12i120.txt', validate_file_path= '/home/rakshitha/PycharmProjects/temperature-forecasting/datasets/text_data/moving_window/with_stl_decomposition/temperature_12i120v.txt', test_file_path= '/home/rakshitha/PycharmProjects/temperature-forecasting/datasets/text_data/moving_window/with_stl_decomposition/temperature_test_12i120.txt', binary_train_file_path= '/home/rakshitha/PycharmProjects/temperature-forecasting/datasets/binary_data/moving_window/with_stl_decomposition/temperature_12i120.tfrecords', binary_validation_file_path= '/home/rakshitha/PycharmProjects/temperature-forecasting/datasets/binary_data/moving_window/with_stl_decomposition/temperature_12i120v.tfrecords', binary_test_file_path= '/home/rakshitha/PycharmProjects/temperature-forecasting/datasets/binary_data/moving_window/with_stl_decomposition/temperature_test_12i120.tfrecords' ) tfrecord_writer.read_text_data() tfrecord_writer.write_train_data_to_tfrecord_file() tfrecord_writer.write_validation_data_to_tfrecord_file() tfrecord_writer.write_test_data_to_tfrecord_file()
import os output_path = "'../../../../datasets/binary_data/M4/moving_window/without_stl_decomposition/" if not os.path.exists(output_path): os.makedirs(output_path) if __name__ == '__main__': # macro data tfrecord_writer = TFRecordWriter( input_size=15, output_size=18, train_file_path= '../../../../datasets/text_data/M4/moving_window/without_stl_decomposition/m4_monthly_macro_18i15.txt', validate_file_path= '../../../../datasets/text_data/M4/moving_window/without_stl_decomposition/m4_monthly_macro_18i15v.txt', test_file_path= '../../../../datasets/text_data/M4/moving_window/without_stl_decomposition/m4_test_monthly_macro_18i15.txt', binary_train_file_path=output_path + 'm4_monthly_macro_18i15.tfrecords', binary_validation_file_path=output_path + 'm4_monthly_macro_18i15v.tfrecords', binary_test_file_path=output_path + 'm4_test_monthly_macro_18i15.tfrecords') tfrecord_writer.read_text_data() tfrecord_writer.write_train_data_to_tfrecord_file() tfrecord_writer.write_validation_data_to_tfrecord_file() tfrecord_writer.write_test_data_to_tfrecord_file() # micro data tfrecord_writer = TFRecordWriter(
from tfrecords_handler.moving_window.tfrecord_writer import TFRecordWriter import os output_path = "../datasets/binary_data/kaggle_web_traffic/moving_window/" if not os.path.exists(output_path): os.makedirs(output_path) if __name__ == '__main__': tfrecord_writer = TFRecordWriter( input_size = 9, output_size = 59, train_file_path = '../datasets/text_data/kaggle_web_traffic/moving_window/kaggle_stl_59i9.txt', validate_file_path = '../datasets/text_data/kaggle_web_traffic/moving_window/kaggle_stl_59i9v.txt', test_file_path = '../datasets/text_data/kaggle_web_traffic/moving_window/kaggle_test_59i9.txt', binary_train_file_path = output_path + 'kaggle_stl_59i9.tfrecords', binary_validation_file_path = output_path + 'kaggle_stl_59i9v.tfrecords', binary_test_file_path = output_path + 'kaggle_test_59i9.tfrecords' ) tfrecord_writer.read_text_data() tfrecord_writer.write_train_data_to_tfrecord_file() tfrecord_writer.write_validation_data_to_tfrecord_file() tfrecord_writer.write_test_data_to_tfrecord_file()
from tfrecords_handler.moving_window.tfrecord_writer import TFRecordWriter import os output_path = "../../../../datasets/binary_data/CIF_2016/moving_window/without_stl_decomposition/" if not os.path.exists(output_path): os.makedirs(output_path) if __name__ == '__main__': tfrecord_writer = TFRecordWriter( input_size=7, output_size=6, train_file_path= '../../../../datasets/text_data/CIF_2016/moving_window/without_stl_decomposition/cif_6i7.txt', validate_file_path= '../../../../datasets/text_data/CIF_2016/moving_window/without_stl_decomposition/cif_6i7v.txt', test_file_path= '../../../../datasets/text_data/CIF_2016/moving_window/without_stl_decomposition/cif6test.txt', binary_train_file_path=output_path + 'cif_6i7.tfrecords', binary_validation_file_path=output_path + 'cif_6i7v.tfrecords', binary_test_file_path=output_path + 'cif6test.tfrecords') tfrecord_writer.read_text_data() tfrecord_writer.write_train_data_to_tfrecord_file() tfrecord_writer.write_validation_data_to_tfrecord_file() tfrecord_writer.write_test_data_to_tfrecord_file()
from tfrecords_handler.moving_window.tfrecord_writer import TFRecordWriter import os output_path = "../../../../datasets/binary_data/Tourism/moving_window/without_stl_decomposition/" if not os.path.exists(output_path): os.makedirs(output_path) if __name__ == '__main__': tfrecord_writer = TFRecordWriter( input_size=15, output_size=24, train_file_path= '../../../../datasets/text_data/Tourism/moving_window/without_stl_decomposition/tourism_24i15.txt', validate_file_path= '../../../../datasets/text_data/Tourism/moving_window/without_stl_decomposition/tourism_24i15v.txt', test_file_path= '../../../../datasets/text_data/Tourism/moving_window/without_stl_decomposition/tourism_test_24i15.txt', binary_train_file_path=output_path + 'tourism_24i15.tfrecords', binary_validation_file_path=output_path + 'tourism_24i15v.tfrecords', binary_test_file_path=output_path + 'tourism_test_24i15.tfrecords') tfrecord_writer.read_text_data() tfrecord_writer.write_train_data_to_tfrecord_file() tfrecord_writer.write_validation_data_to_tfrecord_file() tfrecord_writer.write_test_data_to_tfrecord_file()
from tfrecords_handler.moving_window.tfrecord_writer import TFRecordWriter import os output_path = "../../../../datasets/binary_data/NN5/moving_window/without_stl_decomposition/" if not os.path.exists(output_path): os.makedirs(output_path) if __name__ == '__main__': tfrecord_writer = TFRecordWriter( input_size=9, output_size=56, train_file_path= '../../../../datasets/text_data/NN5/moving_window/without_stl_decomposition/nn5_56i9.txt', validate_file_path= '../../../../datasets/text_data/NN5/moving_window/without_stl_decomposition/nn5_56i9v.txt', test_file_path= '../../../../datasets/text_data/NN5/moving_window/without_stl_decomposition/nn5_test_56i9.txt', binary_train_file_path=output_path + 'nn5_56i9.tfrecords', binary_validation_file_path=output_path + 'nn5_56i9v.tfrecords', binary_test_file_path=output_path + 'nn5_test_56i9.tfrecords') tfrecord_writer.read_text_data() tfrecord_writer.write_train_data_to_tfrecord_file() tfrecord_writer.write_validation_data_to_tfrecord_file() tfrecord_writer.write_test_data_to_tfrecord_file()