https://pyecontech.com/2020/06/12/hierarchical_clustering/

  1. 如果採用聚合的方式,階層式分群法可由樹狀結構的底部開始,將資料或群聚逐次合併
  2. 如果採用分裂的方式,則由樹狀結構的頂端開始,將群聚逐次分裂。

Untitled

Untitled

Untitled

Coding!

mpg cylinders displacement horsepower weight acceleration model_year origin name
18 8 307 130 3504 12 70 usa chevrolet chevelle malibu

每加侖汽車英里數、汽缸數、排量、馬力、重量、加速度、車型年份、原產地、品牌名

sklearn.cluster.AgglomerativeClustering — scikit-learn 1.3.0 documentation

Untitled

Untitled