Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
76
def
classifyVector(inX, weights):
77
prob = sigmoid(sum(inX*weights))
78
if
prob > 0.5:
return
1.0
79
else
:
return
0.0
80
81
def
colicTest():
82
frTrain = open(
'horseColicTraining.txt'
)
Callers
1
colicTest
Function · 0.85
Calls
1
sigmoid
Function · 0.85
Tested by
no test coverage detected