print("Success!!!\n\n") # print("The accuracy of the model is:-") # print(test_acc * 100) # ========================================================================================== # ================ # MAIN PROCESSING # ================ # ========================================================================================== # Fetching data for trainig the model print("Reading the data from the files...\n\n") train_path = "./raw/train/" data = obj.read_data(train_path) print("Preprocessing the data loaded...\n\n") data, le = obj.preprocess_data(data) # Function for splitting the data in the train and the test set for a particular class # We are keeping the data for 17 people in the train set and rest in the test set train_data = data[data["id"] < 1616] test_data = data[data["id"] > 1615] # Splitting the data in segments print("Splitting the train data into segments for training...\n\n") x_train, y_train = obj.segments(train_data, TIME_PERIODS, STEP_DISTANCE, 'label') print("Splitting the train data into segments for training...\n\n") x_test, y_test = obj.segments(test_data, TIME_PERIODS, STEP_DISTANCE, 'label')