from sklearn.metrics import accuracy_score, f1_score, recall_score, precision_score from sklearn.model_selection import KFold, train_test_split from liu_ebrb import LiuEBRBClassifier from process_data import process_to_pieces import random import pandas as pd from random_process import random_array df = pd.read_csv('newdata.csv', names=[' HR', ' PULSE', ' RESP', ' SpO2', 'Class']) X = df.drop(['Class'], axis=1).values y = df["Class"].values A, D = process_to_pieces(X, y, 3, 4) ebrb = LiuEBRBClassifier(A, D) X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=1) print(X_train) ebrb = ebrb.fit(X_train, y_train) y_predict = ebrb.predict(X_test) print(y_predict) print(accuracy_score(y_predict, y_test))