MCPcopy Create free account
hub / github.com/Jack-Cherish/Machine-Learning / classifyVector

Function classifyVector

Logistic/colicLogRegres.py:147–150  ·  view source on GitHub ↗
(inX, weights)

Source from the content-addressed store, hash-verified

145 2017-09-05
146"""
147def classifyVector(inX, weights):
148 prob = sigmoid(sum(inX*weights))
149 if prob > 0.5: return 1.0
150 else: return 0.0
151
152"""
153函数说明:使用Sklearn构建Logistic回归分类器

Callers 1

colicTestFunction · 0.85

Calls 1

sigmoidFunction · 0.70

Tested by

no test coverage detected