用python導入原始數據集

def loadDataSet(fileName): numFeat = len(open(fileName).readline().split('\t')) # 計算有多少列 dataMat = [] labelMat = [] fr = open(fileName) for line in fr.readlines(): # 遍歷原始數據集每一行
相關文章
相關標籤/搜索