Skip to content

Instantly share code, notes, and snippets.

@BenTenmann
Created January 24, 2021 13:57
Show Gist options
  • Save BenTenmann/02dcfcb7023f861d5bcab8a2a6501331 to your computer and use it in GitHub Desktop.
Save BenTenmann/02dcfcb7023f861d5bcab8a2a6501331 to your computer and use it in GitHub Desktop.
tds_2
# testing
err = 0
for n in range(n_data_points-test, n_data_points):
z = np.array(inputs[n])
t = int(np.sum(z) >= 0)
x = np.append(z, -1)
err += loss(t, f(x.dot(w)))
test_err = err/test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment