x =[]withopen('../data/multiple3.txt','r')as f:for line in f.readlines():# 每一行数据按照,分隔
data =[float(substr)for substr in line.split(',')]print(data)
x.append(data)
x = np.array(x)
朴素贝叶斯Time: 2021-01-14 星期四 17:30import sklearn.cluster as scimport numpy as np加载数据x = []with open('../data/multiple3.txt', 'r') as f: for line in f.readlines(): # 每一行数据按照,分隔 data = [float(substr) for substr in line.split(',')]