Created
September 29, 2021 08:56
-
-
Save randhindi/d39971979e02b3623273e154c09fb3e6 to your computer and use it in GitHub Desktop.
Logreg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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