Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
Indexed
MCP
copy
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型函数
179
def
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型函数导数
186
def
sigmoidGradient(z):
Callers
4
nnCostFunction
Function · 0.70
nnGradient
Function · 0.70
sigmoidGradient
Function · 0.70
predict
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected