Skip to content

Instantly share code, notes, and snippets.

View aruncjohn44's full-sized avatar

Arun C John aruncjohn44

View GitHub Profile
# Exact String Matching
def exact_match_deduplication(texts):
return list(set(texts))
def adam(cost_func, X, y, lr=0.01, beta1 = 0.9, beta2 = 0.999, plot=True):
"""
Adam
"""
e = 1e-7
params ={'w':np.zeros(X.shape[1]), 'b':0.}
params_m = {'w_m': np.zeros(X.shape[1]), 'b_m':0.}
params_v = {'w_v': np.zeros(X.shape[1]), 'b_v':0.}
def rmsprop(J, X, y, gamma=0.9, plot=False):
"""P
RMS prop
"""
lr = 0.1 # Learning rate
e = 1e-7 # Epsilon value to
params = {
'w': np.zeros(X.shape[1:]),
'b': 0.
# Adagrad
def adgrad(cost_func, X, y, gamma = 0.9, lr = 0.01, plot= False):
"""
Adagrad
"""
e = 1e-7
params = {'w': np.zeros(X.shape[1]), 'b': 0.}
# Velocity parameters