Skip to content

Instantly share code, notes, and snippets.

@tarunlnmiit
Created August 18, 2020 19:19
Show Gist options
  • Save tarunlnmiit/ffcf3acada3d7df941ea88dc2af16ff1 to your computer and use it in GitHub Desktop.
Save tarunlnmiit/ffcf3acada3d7df941ea88dc2af16ff1 to your computer and use it in GitHub Desktop.
def calculatePredicatedValue(X, W):
f_x = np.dot(X, W)
for i in range(len(f_x)):
if f_x[i][0] > 0:
f_x[i][0] = 1
else:
f_x[i][0] = 0
return f_x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment