Advertisement
thecoshman

Untitled

Feb 10th, 2012
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1.  
  2. 1: Initialize f = 1=(k(1 + log n)) and an empty set K
  3. 2: while some portion of the stream remains unread do
  4. 3: while jKj   = (k log n) and some portion of the stream is unread do
  5. 4: Read the next point x from the stream
  6. 5: Measure  = miny2K d(x; y)
  7. 2
  8. 6: if probability =f event occurs then
  9. 7: set K K
  10. S
  11. fxg
  12. 8: else
  13. 9: assign x to its closest facility in K
  14. 10: if stream not exhausted then
  15. 11: while jKj >  do
  16. 12: Set f f
  17. 13: Move each x 2 K to the center-of-mass of its points
  18. 14: Let wx be the number of points assigned to x 2 K
  19. 15: Initialize K^
  20. containing the first facility from K
  21. 16: for each x 2 K do
  22. 17: Measure  = min
  23. y2K^ d(x; y)
  24. 2
  25. 18: if probability wx=f event occurs then
  26. 19: set K^ K^
  27. S
  28. fxg
  29. 20: else
  30. 21: assign x to its closest facility in K^
  31. 22: Set K K^
  32. 23: else
  33. 24: Run batch k-means algorithm on weighted points K
  34. 25: Perform ball k-means (as per [9]) on the resulting set of cluster
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement