Feb-19-2017, 11:43 PM (This post was last modified: Feb-19-2017, 11:49 PM by pstarrett. Edited 5 times in total.)

I am working with sklearn's Agglomerative Hierarchical Clustering and I have a simple issue with how to set up the input array. I am following the example here:

https://docs.scipy.org/doc/scipy/referen...ogram.html

I have a basic understanding of the numpy array but having difficulty setting this up to a rather simple use case (I have searched extensively for examples and all use randomly generated data to create array values). I would simply like to take one column of account numbers and cluster them by the dollar value (an integer, rounded to nearest dollar) in another column. I am using a CSV DictReader so you can assume I will know how to pull data from the data source and load into the array. I just need to know if creating an array with the account number in one column and the dollar amount in the other is sufficient (assuming the distance metric chosen will be used to calculate the distances between dollar values between account numbers). I believe I know how to set the label values (so that the leaves show up as corresponding account numbers) but any help there is also appreciated. Thank you!

https://docs.scipy.org/doc/scipy/referen...ogram.html

I have a basic understanding of the numpy array but having difficulty setting this up to a rather simple use case (I have searched extensively for examples and all use randomly generated data to create array values). I would simply like to take one column of account numbers and cluster them by the dollar value (an integer, rounded to nearest dollar) in another column. I am using a CSV DictReader so you can assume I will know how to pull data from the data source and load into the array. I just need to know if creating an array with the account number in one column and the dollar amount in the other is sufficient (assuming the distance metric chosen will be used to calculate the distances between dollar values between account numbers). I believe I know how to set the label values (so that the leaves show up as corresponding account numbers) but any help there is also appreciated. Thank you!