You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Josep Rubió (JIRA)" <ji...@apache.org> on 2016/09/08 03:49:20 UTC

[jira] [Comment Edited] (FLINK-1707) Add an Affinity Propagation Library Method

    [ https://issues.apache.org/jira/browse/FLINK-1707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15425389#comment-15425389 ] 

Josep Rubió edited comment on FLINK-1707 at 9/8/16 3:49 AM:
------------------------------------------------------------

Hi [~vkalavri],

I changed the implementation, now: 

* The convergence condition changes to local modifications to the vertices that decide to be exemplars instead of no modifications in messages. This should remain the same for certain number of steps that are defined in the constructor
* The values hash map is no longer needed
* If a damping factor different to 0 is provided to the AP constructor, the oldValues HashMap will be populated and messages will be damped
* If a damping factor of 0 is provided to the constructor the oldValues HashMap will not be created

I will update the document

Thanks!


was (Author: joseprupi):
Hi [~vkalavri],

I changed the implementation now having these members for E vertices:

private HashMap<Long,Double> weights;
private HashMap<Long,Double> oldValues;
private long exemplar;
private int convergenceFactor;
private int convergenceFactorCounter;

where before it was:

private HashMap<Long,Double> weights;
private HashMap<Long,Double> values;
private HashMap<Long,Double> oldValues;
private long exemplar;

So:

* The values hash map is no longer needed
* If a damping factor different to 0 is provided to the AP constructor, the oldValues HashMap will be populated and the algorithm will work the same way it was before. 
* If a damping factor of 0 is provided to the constructor:
	-- The convergence condition changes to local modifications to the vertices that decide to be exemplars instead of no modifications in messages. This should remain the same for certain number of steps that are defined in the constructor
        -- There is no damping factor applied to messages
        -- The oldValues HashMap is not used

Now I need to change the initialization of the graph, I will post the question to the dev group and see if someone can help me on doing it the best way. Once I finish it I will clean and comment the code, update the document and submit a new pull request.

Thanks!

> Add an Affinity Propagation Library Method
> ------------------------------------------
>
>                 Key: FLINK-1707
>                 URL: https://issues.apache.org/jira/browse/FLINK-1707
>             Project: Flink
>          Issue Type: New Feature
>          Components: Gelly
>            Reporter: Vasia Kalavri
>            Assignee: Josep Rubió
>            Priority: Minor
>              Labels: requires-design-doc
>         Attachments: Binary_Affinity_Propagation_in_Flink_design_doc.pdf
>
>
> This issue proposes adding the an implementation of the Affinity Propagation algorithm as a Gelly library method and a corresponding example.
> The algorithm is described in paper [1] and a description of a vertex-centric implementation can be found is [2].
> [1]: http://www.psi.toronto.edu/affinitypropagation/FreyDueckScience07.pdf
> [2]: http://event.cwi.nl/grades2014/00-ching-slides.pdf
> Design doc:
> https://docs.google.com/document/d/1QULalzPqMVICi8jRVs3S0n39pell2ZVc7RNemz_SGA4/edit?usp=sharing
> Example spreadsheet:
> https://docs.google.com/spreadsheets/d/1CurZCBP6dPb1IYQQIgUHVjQdyLxK0JDGZwlSXCzBcvA/edit?usp=sharing



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)