Added kmeans template
This commit is contained in:
14
src/algorithms/kmeansMkI.py
Normal file
14
src/algorithms/kmeansMkI.py
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
#title: kmeansMkI.py
|
||||||
|
#description: Our personal Python K-Means implementation
|
||||||
|
#author: Tillmann Brendel, Conrad Großer
|
||||||
|
#date: 26.05.2018
|
||||||
|
#version: 0.1
|
||||||
|
#usage: python pyscript.py
|
||||||
|
#notes:
|
||||||
|
#known_issues:
|
||||||
|
#python_version: 3.x
|
||||||
|
#==============================================================================
|
||||||
|
|
||||||
|
def startup():
|
||||||
|
print("Hello World")
|
||||||
@@ -14,11 +14,13 @@ def generate09():
|
|||||||
for i in range(0,3):
|
for i in range(0,3):
|
||||||
plz = plz + str(randint(0,9))
|
plz = plz + str(randint(0,9))
|
||||||
return plz
|
return plz
|
||||||
|
|
||||||
def generatePLZ():
|
def generatePLZ():
|
||||||
plz = ""
|
plz = ""
|
||||||
for i in range(0,5):
|
for i in range(0,5):
|
||||||
plz = plz + str(randint(0,9))
|
plz = plz + str(randint(0,9))
|
||||||
return plz
|
return plz
|
||||||
|
|
||||||
# randomI function which creates each file
|
# randomI function which creates each file
|
||||||
def randomI(units, rows, rowLength, partstart, cluster):
|
def randomI(units, rows, rowLength, partstart, cluster):
|
||||||
for setcounter in range(0, units):
|
for setcounter in range(0, units):
|
||||||
|
|||||||
Reference in New Issue
Block a user