MCPcopy
hub / github.com/Jack-Lee-Hiter/AlgorithmsByPython / classifyVector

Function classifyVector

Logistic regression/Logistic.py:76–79  ·  view source on GitHub ↗
(inX, weights)

Source from the content-addressed store, hash-verified

74 plt.show()
75
76def classifyVector(inX, weights):
77 prob = sigmoid(sum(inX*weights))
78 if prob > 0.5: return 1.0
79 else: return 0.0
80
81def colicTest():
82 frTrain = open('horseColicTraining.txt')

Callers 1

colicTestFunction · 0.85

Calls 1

sigmoidFunction · 0.85

Tested by

no test coverage detected