MCPcopy Index your code
hub / github.com/lawlite19/MachineLearning_Python / sigmoid

Function sigmoid

NeuralNetwok/NeuralNetwork.py:179–183  ·  view source on GitHub ↗
(z)

Source from the content-addressed store, hash-verified

177
178# S型函数
179def sigmoid(z):
180 h = np.zeros((len(z),1)) # 初始化,与z的长度一致
181
182 h = 1.0/(1.0+np.exp(-z))
183 return h
184
185# S型函数导数
186def sigmoidGradient(z):

Callers 4

nnCostFunctionFunction · 0.70
nnGradientFunction · 0.70
sigmoidGradientFunction · 0.70
predictFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected