[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=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 HashMapweights; private HashMap oldValues; private long exemplar; private int convergenceFactor; private int convergenceFactorCounter; where before it was: private HashMap weights; private HashMap values; private HashMap 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)
[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=15442548#comment-15442548 ] Josep Rubió edited comment on FLINK-1707 at 8/28/16 1:48 AM: - Hi [~vkalavri], I've pushed a new version of AP with following changes: https://github.com/joseprupi/flink/blob/vertexcentric/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/AffinityPropagation.java - I've changed the model to the vertex centric avoiding having the values in the the vertices - I've added the option of no damping. When a 0 factor of damping is passed to the constructor the convergence condition is no changes on the exemplars on a certain number of iterations, avoiding to have the old values in vertices. This number of iterations is the last parameter of the constructor. If a damping factor different to 0 is used it keeps working as before, having to hold the old sent values in the vertex. To do: - I have not changed the initialization of the graph yet. I posted a question in dev thread with no much luck. Maybe I will implement an initialization with a similarity matrix for now and will see how I can do it using gelly functionality later - I will try to change where are the weight values to be in the edges instead of vertices (I've created a new version of the design document with the diagrams too). This way vertices will only have the old values in case the damping factor has to be used. Thanks!! was (Author: joseprupi): Hi [~vkalavri] I've pushed a new version of AP with following changes: https://github.com/joseprupi/flink/blob/vertexcentric/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/AffinityPropagation.java - I've changed the model to the vertex centric avoiding having the values in the the vertices - I've added the option of no damping. When a 0 factor of damping is passed to the constructor the convergence condition is no changes on the exemplars on a certain number of iterations, avoiding to have the old values in vertices. This number of iterations is the last parameter of the constructor. If a damping factor different to 0 is used it keeps working as before, having to hold the old sent values in the vertex. To do: - I have not changed the initialization of the graph yet. I posted a question in dev thread with no much luck. Maybe I will implement an initialization with a similarity matrix for now and will see how I can do it using gelly functionality later - I will try to change where are the weight values to be in the edges instead of vertices (I've created a new version of the design document with the diagrams too). This way vertices will only have the old values in case the damping factor has to be used. > 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)
[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=15442548#comment-15442548 ] Josep Rubió edited comment on FLINK-1707 at 8/28/16 1:47 AM: - Hi [~vkalavri] I've pushed a new version of AP with following changes: https://github.com/joseprupi/flink/blob/vertexcentric/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/AffinityPropagation.java - I've changed the model to the vertex centric avoiding having the values in the the vertices - I've added the option of no damping. When a 0 factor of damping is passed to the constructor the convergence condition is no changes on the exemplars on a certain number of iterations, avoiding to have the old values in vertices. This number of iterations is the last parameter of the constructor. If a damping factor different to 0 is used it keeps working as before, having to hold the old sent values in the vertex. To do: - I have not changed the initialization of the graph yet. I posted a question in dev thread with no much luck. Maybe I will implement an initialization with a similarity matrix for now and will see how I can do it using gelly functionality later - I will try to change where are the weight values to be in the edges instead of vertices (I've created a new version of the design document with the diagrams too). This way vertices will only have the old values in case the damping factor has to be used. was (Author: joseprupi): Hi [~vkalavri] I've pushed a new version of AP with following changes: https://github.com/joseprupi/flink/blob/vertexcentric/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/AffinityPropagation.java - I've changed the model to the vertex centric avoiding having the values in the the vertices - I've added the option of no damping. When a 0 factor of damping is passed to the constructor the convergence condition is no changes on the exemplars on a certain number of iterations. This number of iterations is the last parameter of the constructor. If a damping factor different to 0 is used it keep working as before, having to hold the old sent values in the vertex. To do: - I have not changed the initialization of the graph yet. I posted a question in dev thread with no much luck. Maybe I will implement an initialization with a similarity matrix for now and will see how I can do it using gelly functionality later - I will try to change where are the weight values to be in the edges instead of vertices (I've created a new version of the design document with the diagrams too). This way vertices will only have the old values in case the damping factor has to be used. > 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)
[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=15425389#comment-15425389 ] Josep Rubió edited comment on FLINK-1707 at 8/17/16 9:13 PM: - Hi [~vkalavri], I changed the implementation now having these members for E vertices: private HashMapweights; private HashMap oldValues; private long exemplar; private int convergenceFactor; private int convergenceFactorCounter; where before it was: private HashMap weights; private HashMap values; private HashMap 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! was (Author: joseprupi): Hi [~vkalavri], I changed the implementation now having these members for E vertices: private HashMap weights; private HashMap oldValues; private long exemplar; private int convergenceFactor; private int convergenceFactorCounter; where before it was: private HashMap weights; private HashMap values; private HashMap 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)
[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=15425389#comment-15425389 ] Josep Rubió edited comment on FLINK-1707 at 8/17/16 9:12 PM: - Hi [~vkalavri], I changed the implementation now having these members for E vertices: private HashMapweights; private HashMap oldValues; private long exemplar; private int convergenceFactor; private int convergenceFactorCounter; where before it was: private HashMap weights; private HashMap values; private HashMap 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! was (Author: joseprupi): Hi [~vkalavri], I changed the implementation now having these members for E vertices: private HashMap weights; private HashMap oldValues; private long exemplar; private int convergenceFactor; private int convergenceFactorCounter; where before it was: private HashMap weights; private HashMap values; private HashMap 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)
[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=15425389#comment-15425389 ] Josep Rubió edited comment on FLINK-1707 at 8/17/16 9:12 PM: - Hi [~vkalavri], I changed the implementation now having these members for E vertices: private HashMapweights; private HashMap oldValues; private long exemplar; private int convergenceFactor; private int convergenceFactorCounter; where before it was: private HashMap weights; private HashMap values; private HashMap 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! was (Author: joseprupi): Hi [~vkalavri], I changed the implementation now having these members for E vertices: private HashMap weights; private HashMap oldValues; private long exemplar; private int convergenceFactor; private int convergenceFactorCounter; where before it was: private HashMap weights; private HashMap values; private HashMap 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)
[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=15425389#comment-15425389 ] Josep Rubió edited comment on FLINK-1707 at 8/17/16 9:12 PM: - Hi [~vkalavri], I changed the implementation now having these members for E vertices: private HashMapweights; private HashMap oldValues; private long exemplar; private int convergenceFactor; private int convergenceFactorCounter; where before it was: private HashMap weights; private HashMap values; private HashMap 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! was (Author: joseprupi): Hi [~vkalavri], I changed the implementation now having these members for E vertices: private HashMap weights; private HashMap oldValues; private long exemplar; private int convergenceFactor; private int convergenceFactorCounter; where before it was: private HashMap weights; private HashMap values; private HashMap 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)