0

I am in need of some direction. I have a class in python that has an array of 40 attributes, if the attribute exists then that instance of the class get a 1 in that slot of its attributes array.

class.instance
 attributes = [0,1,0...]

From what I've read if I wanted to create a hierarchical cluster I would need to use Jaccard distance because these are sets. I used:

scipy.spatial.distance.jaccard(instance1.attributes, instance2.attributes)

And got the distance between 100 different instances, so now I have a 100 x 100 matrix. Any suggestions on visualizing it?

Sorry if this makes little sense, or i'm not even close. I've been thrown in deep water here and am struggling to stay afloat.

Tony
  • 1,318
  • 1
  • 14
  • 36
  • Would visualizing the matrix as a picture work for you? If yes, some examples are shown [here](http://stackoverflow.com/questions/5552641/plotting-a-2d-matrix-in-python-code-and-most-useful-visualization). – Cyb3rFly3r Apr 16 '16 at 02:50
  • Thanks for the suggestion, i can use that for another aspect of the project, but for this i'm trying to create some sort of cluster graph and preferably a hierarchical one. All my classes are beers, with descriptions either as 1 or 0, so my goal is to show easily and quickly which are close together. – Tony Apr 16 '16 at 03:23

0 Answers0