Skip to content

Instantly share code, notes, and snippets.

View pratu16x7's full-sized avatar

Prateeksha Singh pratu16x7

View GitHub Profile
@CodeMyUI
CodeMyUI / floating-note.markdown
Created February 2, 2020 23:19
Floating note
from numpy import log, dot, e
from numpy.random import rand
class LogisticRegression:
def sigmoid(self, z): return 1 / (1 + e**(-z))
def cost_function(self, X, y, weights):
z = dot(X, weights)
predict_1 = y * log(self.sigmoid(z))