Affinity propagation
Familiarise yourself with affinity propagation, for example by working through
https://en.wikipedia.org/wiki/Affinity_propagation.
Task 1: Prepare a test dataset
Pick a small set of values that enable you to apply clustering using affinity propagation on paper.
Marking information: Up to 10 points: clarify why you believe your small dataset to be suitable for clustering.
Task 2: Apply affinity propagation on paper
Work through your small dataset from Task 1 to ensure you have known-good results.
Marking information: Up to 20 points: include information on how you sanity-checked your results as the number of iterations may considerably affect the precision of your final values.
Task 3: Implement affinity propagation in Python
You are now set to actually add the implementation. Note that you are expected to fully implement the mathematical operations instead of using a library function such as scikit or statsmodels.
Your implementation may make several assumptions about the inputs provided to it. Make those explicit in comments. Also, provide an estimate on how long execution of your algorithm will take dependent on the input values. Express this estimate as a function of the inputs, such as the number of clusters and/or the number of data points.
Marking information: Up to 50 points: 30 points for a correctly working Python implementation, 10 points for describing limitations and assumptions of your implementation, and 10 points for a description of the complexity of your algorithm.
Task 4: Create a test harness
Test your implementation via unit and integration tests. As part of this work, you may choose to compare to a reference implementation, such as sci-kit learn’s.
Marking information: Up to 20 points: identify suitable unit tests and integration tests.
Explain what coverage you expect your test suite to have.