Skip to content

Instantly share code, notes, and snippets.

View suriyadeepan's full-sized avatar
❤️
Rediscovering the joy of solving problems and building applications

Suriyadeepan Ramamoorthy suriyadeepan

❤️
Rediscovering the joy of solving problems and building applications
View GitHub Profile
@max-mapper
max-mapper / bibtex.png
Last active March 10, 2024 21:53
How to make a scientific looking PDF from markdown (with bibliography)
bibtex.png
@bistaumanga
bistaumanga / kMeans.py
Last active December 7, 2020 10:16
KMeans Clustering Implemented in python with numpy
'''Implementation and of K Means Clustering
Requires : python 2.7.x, Numpy 1.7.1+'''
import numpy as np
def kMeans(X, K, maxIters = 10, plot_progress = None):
centroids = X[np.random.choice(np.arange(len(X)), K), :]
for i in range(maxIters):
# Cluster Assignment step
C = np.array([np.argmin([np.dot(x_i-y_k, x_i-y_k) for y_k in centroids]) for x_i in X])