置信规则库推理
2022/2/25 23:30:47
本文主要是介绍置信规则库推理,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
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))
这篇关于置信规则库推理的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-23Springboot应用的多环境打包入门
- 2024-11-23Springboot应用的生产发布入门教程
- 2024-11-23Python编程入门指南
- 2024-11-23Java创业入门:从零开始的编程之旅
- 2024-11-23Java创业入门:新手必读的Java编程与创业指南
- 2024-11-23Java对接阿里云智能语音服务入门详解
- 2024-11-23Java对接阿里云智能语音服务入门教程
- 2024-11-23JAVA对接阿里云智能语音服务入门教程
- 2024-11-23Java副业入门:初学者的简单教程
- 2024-11-23JAVA副业入门:初学者的实战指南