Skip to content

Instantly share code, notes, and snippets.

@randhindi
Created September 29, 2021 08:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save randhindi/d39971979e02b3623273e154c09fb3e6 to your computer and use it in GitHub Desktop.
Save randhindi/d39971979e02b3623273e154c09fb3e6 to your computer and use it in GitHub Desktop.
Logreg
import hnumpy as hnp
import numpy as np
weights = np.array([0.1, 0.2, 0.3, 0.4, 0.5])
bias = np.array([0.1])
def sigmoid(x):
return 1 / (1 + np.exp(-x))
def func(x):
return sigmoid(np.dot(x, weights) + bias)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment