weights=weights+alpha*error*dataMatrix[randIndex] 改为
for k in range(n):
weights[k] += alpha*error*dataMatrix[randIndex][k]
weights=weights+alpha*error*dataMatrix[randIndex] 改为
for k in range(n):
weights[k] += alpha*error*dataMatrix[randIndex][k]