Browse Source

Update requirements to use https, and update code to use k_means instead of unweighted_k_means

master
Taylor Bockman 5 years ago
parent
commit
7ee7b63ec0
  1. 4
      main.py
  2. 2
      requirements.txt

4
main.py

@ -8,7 +8,7 @@ import matplotlib.pyplot as plt
from scipy.spatial import ConvexHull from scipy.spatial import ConvexHull
from scipy.spatial.qhull import QhullError from scipy.spatial.qhull import QhullError
from kmeans.algorithms import unweighted_k_means from kmeans.algorithms import k_means
from kmeans.clustering.cluster import Cluster from kmeans.clustering.cluster import Cluster
from kmeans.clustering.point import Point from kmeans.clustering.point import Point
@ -69,7 +69,7 @@ def main():
plt.plot(xs, ys, 'o') plt.plot(xs, ys, 'o')
plt.show() plt.show()
clusters = unweighted_k_means(points, 4, 0.001) clusters = k_means(points, 4, 0.001)
# Color clusters # Color clusters
assigned_colors = plt.cm.gist_ncar(np.linspace(0, 1, 4)) assigned_colors = plt.cm.gist_ncar(np.linspace(0, 1, 4))

2
requirements.txt

@ -25,4 +25,4 @@ scipy==1.3.1
six==1.12.0 six==1.12.0
-e git+git://git.xchg.sh/angrygoats/kmeans.git@master#egg=kmeans -e git+https://git.xchg.sh/angrygoats/kmeans.git@master#egg=kmeans

Loading…
Cancel
Save