MCPcopy Index your code
hub / github.com/lazyprogrammer/machine_learning_examples / cost

Function cost

ann_class2/util.py:177–179  ·  view source on GitHub ↗
(p_y, t)

Source from the content-addressed store, hash-verified

175
176
177def cost(p_y, t):
178 tot = t * np.log(p_y)
179 return -tot.sum()
180
181
182def gradW(t, y, X):

Callers 6

mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
benchmark_fullFunction · 0.70
benchmark_pcaFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected