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

Function y2indicator

ann_class2/util.py:190–196  ·  view source on GitHub ↗
(y)

Source from the content-addressed store, hash-verified

188
189
190def y2indicator(y):
191 N = len(y)
192 y = y.astype(np.int32)
193 ind = np.zeros((N, 10))
194 for i in range(N):
195 ind[i, y[i]] = 1
196 return ind
197
198
199def benchmark_full():

Callers 10

mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
cntk_example.pyFile · 0.90
mainFunction · 0.90
keras_example.pyFile · 0.90
benchmark_fullFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected