Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-1522][FLINK-1576] Updated LabelPropagationExample and test #441

Closed
wants to merge 2 commits into from

Conversation

balidani
Copy link
Contributor

Hi!

I converted the Label Propagation example to the conventional format, where the main program takes (optional) arguments. I added a test case as well.

Cheers!

@vasia
Copy link
Contributor

vasia commented Mar 2, 2015

Thanks for this PR @balidani!

In my opinion, we could extend the test case a bit.
It's quite hard to check correctness for this kind of algorithms, but we can still test that the behavior is as expected, inside a single iteration.
More specifically, I would test the following scenarios:

  • initialize a graph where it is trivial to find the most frequently occurring label for each vertex. Test that every vertex indeed adopts the correct label in the next iteration.
  • initialize a graph where for one vertex, there are two labels with the same frequency. Test that ties are broken by adopting the label with the highest value.
  • when no vertex changes label, the algorithm terminates.

@balidani
Copy link
Contributor Author

balidani commented Mar 3, 2015

Hi @vasia!

Thanks for the ideas! I tried to add more test cases that reflect them.
However, I'm not sure about the last bullet-point. Do you think my last test case matches this?

Cheers!

@vasia
Copy link
Contributor

vasia commented Mar 3, 2015

Hi @balidani! You're right, there is no way to check this without modifying the library method. You can ignore my last bullet point for now :)

@asfgit asfgit closed this in b529b62 Mar 4, 2015
marthavk pushed a commit to marthavk/flink that referenced this pull request Jun 9, 2015
pnowojski pushed a commit to pnowojski/flink that referenced this pull request Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants