generated from LufsX/Experiment-LogReg
This commit is contained in:
+2
-2
@@ -111,8 +111,8 @@ def loadDataSet(filename='dataSet.txt'):
|
||||
fr = open(filename)
|
||||
for line in fr.readlines():
|
||||
lineList = line.strip().split()
|
||||
# 修改前
|
||||
dataList.append([1.0, float(lineList[0]), float(lineList[1])])
|
||||
# 修改后
|
||||
dataList.append ([float (lineList [0]), float (lineList [1])])
|
||||
labelList.append(int(lineList[2]))
|
||||
return dataList, labelList
|
||||
|
||||
|
||||
Reference in New Issue
Block a user