Code
Hub
Trending
Following
Digest
Workspaces
Connect
Indexed
MCP
copy
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
190
def
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
199
def
benchmark_full():
Callers
10
main
Function · 0.90
main
Function · 0.90
keras_functional.py
File · 0.90
main
Function · 0.90
main
Function · 0.90
main
Function · 0.90
cntk_example.py
File · 0.90
main
Function · 0.90
keras_example.py
File · 0.90
benchmark_full
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected