Skip to content
Snippets Groups Projects
Commit d55f2b98 authored by Josh Rosen's avatar Josh Rosen
Browse files

Use take() instead of takeSample() in PySpark kmeans example.

This is a temporary change until we port takeSample().
parent 1a64432b
No related branches found
No related tags found
No related merge requests found
...@@ -33,7 +33,9 @@ if __name__ == "__main__": ...@@ -33,7 +33,9 @@ if __name__ == "__main__":
K = int(sys.argv[3]) K = int(sys.argv[3])
convergeDist = float(sys.argv[4]) convergeDist = float(sys.argv[4])
kPoints = data.takeSample(False, K, 34) # TODO: change this after we port takeSample()
#kPoints = data.takeSample(False, K, 34)
kPoints = data.take(K)
tempDist = 1.0 tempDist = 1.0
while tempDist > convergeDist: while tempDist > convergeDist:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment