In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces several clustering methods in MATLAB, which are very detailed and have certain reference value. Friends who are interested must finish reading them.
14 clustering methods (1) longest distance method X = [16.21492 2000-8.26.2; 15.7970 2209-20.61.9; 16.3 1260 2085-17.32.8; 17.214221726-9.54.6; 18.8 1874 1709-4.98.0; 17.91698 1848-4.57.5; 16.3976 1239-5.6]; D=pdist Z=linkage (DMagol complete); H=dendrogram (Z); xlabel ('City'); ylabel (' Scale'); C=cophenet (ZMague D); T=cluster (ZP3)
(2) the shortest distance method
X = [16.21492 2000-8.26.2; 15.7 970 2209-20.61.9; 16.3 1260 2085-17.32.8; 17.2 14221726-9.54.6; 18.8 1874 1709-4.9 8.0; 17.91698 1848-4.57.5; 16.3976 1239-5.6]; D=pdist (XMagazine euclid'); M=squareform (D); Z=linkage (DJournal single`); H=dendrogram (Z) Xlabel ('City'); ylabel (' Scale'); C=cophenet (ZMagneD); T=cluster (Zrecoverycutoffewoul0.8)
(3) Comprehensive clustering subroutine
X = [16.21492 2000-8.26.2; 15.7 970 2209-20.61.9; 16.3 1260 2085-17.32.8; 17.2 14221726-9.54.6; 18.8 1874 1709-4.9 8.0; 17.9 1698 1848-4.57.5; 16.3976 1239-5.6]; T=clusterdata (XMagne0.8); Re=find (Tread5)
(4) Center of gravity method & standard Euclidean distance
S = ['Fukuoka'; 'Hefei'; 'Wuhan'; 'Changsha'; 'Guilin'; 'Wenzhou'; 'Chengdu']; X = [16.21492 2000-8.26.2; 15.7 970 2209-20.6 1.9; 16.3 1260 2085-17.3 2.8; 17..2 14221726-9.54.6; 18.8 1874 1709-4.9 8.0; 17.9 1698 1848-7.5 16.3 976 1239-4.65.6]; D=pdist (XMagnum Seuclid'); M=squareform (D); Z=linkage (Drecincter centroid); H=dendrogram (Zphires labelsPhonology S); xlabel ('City'); ylabel (' Scale'); C=cophenet (ZMagneD); T=cluster (ZMagne3)
(5) Center of gravity method & square of Euclidean distance
S = ['Fukuoka'; 'Hefei'; 'Wuhan'; 'Changsha'; 'Guilin'; 'Wenzhou'; 'Chengdu']; X = [16.21492 2000-8.26.2; 15.7 970 2209-20.6 1.9; 16.3 1260 2085-17.3 2.8; 17..2 14221726-9.54.6; 18.8 1874 1709-4.9 8.0; 17.9 1698 1848-7.5 16.3 976 1239-4.6 5.6]; D=pdist (XMagnum euclid'); D2 = D. ^ 2; M=squareform (D2); Z=linkage (D2 pound centroid); H=dendrogram (Z City'); xlabel ('City'); ylabel (' Scale'); C=cophenet (ZJournal D2); T=cluster (ZJournal 3)
(6) Gravity center method & precision weighted distance
S = ['Fukuoka'; 'Hefei'; 'Wuhan'; 'Changsha'; 'Guilin'; 'Wenzhou'; 'Chengdu']; X = [16.21492 2000-8.26.2; 15.7 970 2209-20.6 1.9; 16.3 1260 2085-17.3 2.8; 17..2 14221726-9.54.6; 18.8 1874 1709-4.9 8.0; 17.9 1698 1848-7.5 16.3 976 1239-4.65.6]; [NMagne m] = size (X); stdx=std (X); X2=X./stdx (ones (NMagne1),:); D=pdist (X2); Z=linkage (D); Z=linkage (D); H=dendrogram (Z City'); ylabel ('Scale'); C=cophenet (ZJR D); T=cluster (ZJ3)
(7) the shortest distance method & the standard Euclidean distance based on principal components
S = ['Fukuoka'; 'Hefei'; 'Wuhan'; 'Changsha'; 'Guilin'; 'Wenzhou'; 'Chengdu']; X = [16.21492 2000-8.26.2; 15.7 970 2209-20.6 1.9; 16.3 1260 2085-17.3 2.8; 17..2 14221726-9.54.6; 18.8 1874 1709-4.9 8.0; 17.9 1698 1848-7.5 [princomp (X); D=pdist (score,'seuclid'); M=squareform (D); Z=linkage (D); H=dendrogram (Z City'); xlabel ('City'); ylabel (' Scale'); C=cophenet (Z charge D); T=cluster (Z charge 3)
(8) average method & standard Euclidean distance
S = ['Fukuoka'; 'Hefei'; 'Wuhan'; 'Changsha'; 'Guilin'; 'Wenzhou'; 'Chengdu']; X = [16.21492 2000-8.26.2; 15.7 970 2209-20.6 1.9; 16.3 1260 2085-17.3 2.8; 17..2 14221726-9.54.6; 18.8 1874 1709-4.9 8.0; 17.9 1698 1848-7.5 16.3 976 1239-4.65.6]; D=pdist (Xrecedence Seuclid'); M=squareform (D); Z=linkage (Drecedence average`); H=dendrogram (Zphiele labelsZhaels); xlabel ('City'); ylabel (' Scale'); C=cophenet (ZMagneD); T=cluster (ZMagne3)
(9) weight method & Standard Euclidean distance
S = ['Fukuoka'; 'Hefei'; 'Wuhan'; 'Changsha'; 'Guilin'; 'Wenzhou'; 'Chengdu']; X = [16.21492 2000-8.26.2; 15.7 970 2209-20.6 1.9; 16.3 1260 2085-17.3 2.8; 17..2 14221726-9.54.6; 18.8 1874 1709-4.9 8.0; 17.9 1698 1848-7.5 16.3 976 1239-4.65.6]; D=pdist (XMagnum Seuclid'); M=squareform (D); Z=linkage (Drecedence weighted`); H=dendrogram (Zpime labelsPierre S); xlabel ('City'); ylabel (' Scale'); C=cophenet (ZMagneD); T=cluster (ZMagne3)
(10) the shortest distance method & Mahalanobis distance
S = ['Fukuoka'; 'Hefei'; 'Wuhan'; 'Changsha'; 'Guilin'; 'Wenzhou'; 'Chengdu']; X = [16.21492 2000-8.26.2; 15.7 970 2209-20.6 1.9; 16.3 1260 2085-17.3 2.8; 17..2 14221726-9.54.6; 18.8 1874 1709-4.9 8.0; 17.9 1698 1848-7.5 16.3 976 1239-4.65.6]; D=pdist (XMagnum mahal'); M=squareform (D); Z=linkage (Drecinction Single`); H=dendrogram (ZmaelsPiaget S); xlabel ('City'); ylabel (' Scale'); C=cophenet (ZMague D); T=cluster (ZMagne3)
(11) Gravity method & the Euclidean distance of standardized data
S = ['Fukuoka'; 'Hefei'; 'Wuhan'; 'Changsha'; 'Guilin'; 'Wenzhou'; 'Chengdu']; X = [16.21492 2000-8.26.2; 15.7 970 2209-20.6 1.9; 16.3 1260 2085-17.3 2.8; 17..2 14221726-9.54.6; 18.8 1874 1709-4.9 8.0; 17.9 1698 1848-7.5 16.3 976 1239-4.65.6]; [st=std m] = size (X); mv=mean (X); st=std (X); x = (X-mv (ones (npen1),:)). / st (ones (npen1),:); D=pdist (Xgrained euclid'); M=squareform (D); Z=linkage (Ddinger centroid'); H=dendrogram (Zparry labelswriting S); xlabel ('City'); ylabel (' Scale'); C=cophenet (ZtemiD); T=cluster (Zminute 3)
(12) the longest distance method & Euclidean distance
S = ['Fukuoka'; 'Hefei'; 'Wuhan'; 'Changsha'; 'Guilin'; 'Wenzhou'; 'Chengdu']; X = [16.21492 2000-8.26.2; 15.7 970 2209-20.6 1.9; 16.3 1260 2085-17.3 2.8; 17..2 14221726-9.54.6; 18.8 1874 1709-4.9 8.0; 17.9 1698 1848-7.5 16.3 976 1239-4.6 5.6]; D=pdist (XMagnum euclid'); M=squareform (D); Z=linkage (Drecincture complete'); [H tPerm] = dendrogram (Zppield labelsChapter S); xlabel ('City'); ylabel (' Scale'); C=cophenet (ZMague D); T=cluster (ZMague 3)
(13) average method & similarity coefficient
S = ['Fukuoka'; 'Hefei'; 'Wuhan'; 'Changsha'; 'Guilin'; 'Wenzhou'; 'Chengdu']; X = [16.21492 2000-8.26.2; 15.7 970 2209-20.6 1.9; 16.3 1260 2085-17.3 2.8; 17..2 14221726-9.54.6; 18.8 1874 1709-4.9 8.0; 17.9 1698 1848-7.5 16.3976 1239-4.65.6]; D=pdist (XMagnum Cosmology); M=squareform (D); Z=linkage (Drecincter centroid); T=dendrogram (Zmai LabelsParticipia S); xlabel ('City'); ylabel (' Scale'); C=cophenet (ZMague D); T=cluster (ZMagne3)
(14) the shortest distance method & the standard Euclidean distance based on principal components
S = ['Fukuoka'; 'Hefei'; 'Wuhan'; 'Changsha'; 'Guilin'; 'Wenzhou'; 'Chengdu']; X = [16.21492 2000-8.26.2; 15.7 970 2209-20.6 1.9; 16.3 1260 2085-17.3 2.8; 17..2 14221726-9.54.6; 18.8 1874 1709-4.9 8.0; 17.9 1698 1848-7.5 16.3976 1239-4.65.6]; [princomp (X); PCA= [score (:, 1), score (:, 2)]; D=pdist (PCA,'seuclid'); M=squareform (D); Z=linkage (D); H=dendrogram (Z City'); xlabel ('City'); ylabel (' Scale'); C=cophenet (ZJ3); T=cluster (ZJ3) These are all the contents of this article entitled "there are several clustering methods in MATLAB". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.