Closed
Conversation
added 2 commits
July 17, 2016 19:03
Please make sure the Kmeans input dataset does not contain duplicates, otherwise takeSample() method may take duplicated examples.
|
Can one of the admins verify this patch? |
| val convergeDist = args(2).toDouble | ||
|
|
||
| /* | ||
| * A requirement of using takeSample() method: the element in data (line 74) should be unique (No duplicates), otherwise the size of newPoints (line 89) will not |
Member
There was a problem hiding this comment.
This sounds like a comment for a caller, but it's not visible to anyone but those reading source code.
Why not just call .distinct in the code to avoid the problem entirely?
Member
|
@kzhang28 update or close this? |
Author
|
@srowen I closed it. Thank you for your kind reminder. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
(comment added, no source code changed)
How was this patch tested?
(unit test)
Please make sure the Kmeans input dataset does not contain duplicates, otherwise takeSample() method may take duplicated examples, leading to runtime exception