Skip to content

Commit

Permalink
starting point
Browse files Browse the repository at this point in the history
  • Loading branch information
elro77 committed Dec 10, 2021
1 parent ee532bb commit e5b186e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
11 changes: 10 additions & 1 deletion DBSCAN_Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
print(elapsed)
###
"""


# this is a fast approach, it takes 4.5 seconds for reading and creating the whole dataset
# its work 223 times faster
t = time.time()
Expand All @@ -25,7 +27,7 @@
elapsed = time.time() - t
print("creating data time: ",elapsed)


"""
#the sklearn clustering takes 117 seconds to accomplish
t = time.time()
clustering = DBSCAN(eps=3, min_samples=2).fit(vectorsArray)
Expand All @@ -34,4 +36,11 @@
#my implementation
"""







20 changes: 20 additions & 0 deletions MyDBSCAN.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import numpy as np
import math


def myDBSCAN(data, minPoints, eps):
return 0




def rangeQuery(data, point, eps):
return 0


def calcEuclideanDistance(p1 ,p2):
sm = 0
for i in range(len(p1)):
sm = sm + (p1[i]-p2[i]) * (p1[i]-p2[i])
return sm

0 comments on commit e5b186e

Please sign in to comment.