from com.test.msbd5001.methods import one_hot_encoder, k_fold, get_train_and_valid_set from keras.layers import Dense, LeakyReLU, ReLU, ELU from keras import Sequential import keras from sklearn.metrics import mean_squared_error csv_file = pd.read_csv('train.csv') standard_features = preprocess_data(csv_file) x_axis = preprocess_data(train_features=csv_file) x_axis = normalize_data(train_features=x_axis, standard_features=standard_features) x_axis = one_hot_encoder(x_axis) column_count = len(x_axis[0]) y_axis = csv_file['time'].values.tolist() # x_axis = np.array(x_axis) # y_axis = np.array(y_axis) # print(x_axis, y_axis) x_axis, y_axis, x_valid, y_valid = get_train_and_valid_set(x_axis, y_axis, 0) x_valid = np.array(x_valid) y_valid = np.array(y_valid) k = 5
import os import csv import tensorflow as tf from com.test.msbd5001.train_model_02 import preprocess_data, normalize_data from com.test.msbd5001.methods import one_hot_encoder, get_train_and_valid_set, k_fold MAX_ITER = 10001 LEARNING_RATE = 0.05 test_csv_file = pd.read_csv('test.csv') test_x_axis = preprocess_data(test_csv_file) test_x_axis = one_hot_encoder(test_x_axis) # print(len(test_x_axis)) csv_file = pd.read_csv('train.csv') standard_features = preprocess_data(csv_file) x_axis = preprocess_data(train_features=csv_file) x_axis = normalize_data(x_axis, standard_features) # print(x_axis['time']) x_axis = one_hot_encoder(x_axis) # x_axis = [x_axis] column_count = len(x_axis[0]) # print(column_count)