Skip to content

Commit f8a5f53

Browse files
authored
Add files via upload
1 parent e025130 commit f8a5f53

13 files changed

+439
-0
lines changed

MeanShift/MeanShiftClustering.py

+414
Large diffs are not rendered by default.
63.4 KB
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
57.2 KB
Loading
63 KB
Loading

MeanShift/use_of_break.py

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#####
2+
#THIS IS FOR MY OWN REFERENCE. THIS HAS NOT MUCH TO DO WITH THE MEAN SHIFT CLUSTERING ALGORITHM THAT I HAVE IMPLEMENTED.
3+
#####
4+
5+
#the following logic has been used in the filtering of the cluster centers lying very clode to each other.
6+
#this is used a rough idea of how we can use break intelligently to check for a condition and if the condition satisfies, we can start over the while loop.
7+
#we will only get out of the while loop when the condition doesnt satisfy even once.
8+
9+
while True:
10+
brk = False
11+
for i in range(5):
12+
#for j in range(5):
13+
for k in range(5):
14+
print(i,k)
15+
if (i,k) == (3,1):
16+
#a=False
17+
brk = True
18+
break #breaks out of the current for loop
19+
if brk == True:
20+
break
21+
print('here')
22+
print('-------')
23+
print('good')
24+
if not brk:
25+
break

0 commit comments

Comments
 (0)