Skip to content

Instantly share code, notes, and snippets.

View adpoe's full-sized avatar
🎯
makin' the codes.

Tony Poerio adpoe

🎯
makin' the codes.
View GitHub Profile
@adpoe
adpoe / uni_gd.py
Created December 16, 2016 01:12
Univariate Gradient Descent, in Python
def gradient_descent(training_examples, alpha=0.01):
"""
Apply gradient descent on the training examples to learn a line that fits through the examples
:param examples: set of all examples in (x,y) format
:param alpha = learning rate
:return:
"""
# initialize w0 and w1 to some small value, here just using 0 for simplicity
w0 = 0
w1 = 0
@adpoe
adpoe / mv_grad_desc.py
Created December 16, 2016 01:31
Multivariate Gradient Descent in Python
def multivariate_gradient_descent(training_examples, alpha=0.01):
"""
Apply gradient descent on the training examples to learn a line that fits through the examples
:param examples: set of all examples in (x,y) format
:param alpha = learning rate
:return:
"""
# initialize the weight and x_vectors
W = [0 for index in range(0, len(training_examples[0][0]))]
@adpoe
adpoe / keras_for_nature_conservatory_kaggle.ipynb
Last active December 24, 2016 01:47
A Quick Start Guide for Using Keras in the Nature Conservatory Kaggle
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@adpoe
adpoe / svm_and_sift.ipynb
Last active December 24, 2016 22:56
SVM and SIFT Nature Conservatory Kaggle Entry
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.