标签:near open 数据集 div pen rip read mat turn
def loadDataSet(filename): f = open(filename) numFeatures = len(f.readline().split(‘\t‘)) - 1 dataMat = [] labelMat = [] for line in f.readlines(): lineArr=[] curLine=line.strip().split(‘\t‘) for i in range(0,numFeatures): lineArr.append(float(curLine[i])) dataMat.append(lineArr) labelMat.append(float(curLine[-1])) return dataMat,labelMat
标签:near open 数据集 div pen rip read mat turn
原文地址:https://www.cnblogs.com/zhhy236400/p/9923870.html