Python Forum
Sklearn Agglomerative Hierarchical Clustering - help with array set up
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sklearn Agglomerative Hierarchical Clustering - help with array set up
#1
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!
Reply


Messages In This Thread
Sklearn Agglomerative Hierarchical Clustering - help with array set up - by pstarrett - Feb-19-2017, 11:43 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Stock clustering and portfolio diversification. Suitable features. timurkanaz 1 228 Mar-27-2024, 09:54 AM
Last Post: Larz60+
  Column Transformer with Mixed Types - sklearn aaldb 0 328 Feb-22-2024, 03:27 PM
Last Post: aaldb
  Pandas hierarchical sum mariostg 1 437 Jan-26-2024, 03:47 PM
Last Post: mariostg
  K Means Clustering antouanet 0 683 Jan-30-2023, 01:18 PM
Last Post: antouanet
  Is there a hierarchical catalog of Anaconda libraries divided by the type of tasks? AlekseyPython 1 1,607 Nov-25-2020, 09:11 AM
Last Post: Larz60+
  sklearn.neural_network MLPClassifier forecast variances CK1960 1 1,813 Oct-29-2020, 10:13 AM
Last Post: CK1960
  Customizing an sklearn submodule with cython JHogg11 0 1,959 May-27-2020, 05:39 PM
Last Post: JHogg11
  sklearn and train_test_split nsadams87xx 1 1,824 Apr-23-2020, 05:32 PM
Last Post: jefsummers
  Error When Using sklearn Predict Function firebird 0 2,056 Mar-21-2020, 04:34 PM
Last Post: firebird
  Outputing LogisticRegression Coefficients (sklearn) RawlinsCross 6 4,767 Feb-27-2020, 02:47 PM
Last Post: RawlinsCross

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020