Broken string value comparison method in Affinity Propagation

The old code used 'is' instead of '==' to compare the user defined value of the 'affinity' parameter for the Affinity Propagation constructor. This causes problems when the input value is retrieved from an external source such as a file because the ID of the values will never be equivalent since they are stored in different locations in memory. '==' should be used to compare the string values instead of the string IDs.