功能>通用應用數學,統計數字performsk-meansclusteringviahartigandwongas-136算法。可用版本6.3.0及更高版本functionkmeans_as136(x:數字,;浮動雙k[1]:整數" />
QQ:2743438924
手機:0512-66159259
電話:0512-66159259
郵箱:tokai@tokais.net
地址:蘇州相城黃埭高新區東橋聚民路68號
文檔>
功能>
通用應用數學,
統計數字
perform sk-means clustering via hartigandwongas-136算法。
可用版本6 . 3 . 0及更高版本
functionkmeans_as136(
x:數字,;浮動雙
k[1]:整數,
選項[1]:邏輯
return_val:floatordouble
returnarray(比方說),clcnter,將包含集群
中心。itwillbeddimensioned(k,N),其中N
集合表示“變量”維度。
clcnterwillhavethefollowing attributeassociatedwith:
一維整數陣列
sizemindictiongteclustertowheachobservationis
已分配。
npts-一維整數陣列
sizekcontainingthenumberofpointsineachcluster。
ss2-一維雙向數組
sizekcontainingthewisin-clustersumofsquares。
k-meansisancetroid-based cluster method。
observations areallocatedtokclustersinsuwaythe
within-clustersumofsquaresis更小化。k-均值聚類要求
然后numberofclusterstobeextractedspecifiedinadvance。
Asnotedby
然后是numberofclustersshouldmatchthedata。一個不正確的選擇將驗證整個過程。
當數據適合集群模型時,k-means算法工作合理:
集群的數量與數據“一致”。
數據點withinclusterarecenteraroundthatcluster
thespread/varianceoftclustersis similar,ieeachdatapointbelongstoclosestcluster
限制:K-means mayhaveproblemswhentclustersareoffverydifferingsizes;
outliers存在;oremptyclustersexist。
theoriginalcodeicreated for caterasiangrid。如果應用程序需要使用網格點
或者是高緯度地區的研究表明
CSS 2已使用
這些更好的反映了真實距離和應該輸入的功能。
themodifiedcodeusebythisfunctionwasdowloadedfrom
JohnBurkardt的網站。
TheoriginalHartigan & WongFortrancodewasfrom:
約翰·哈迪根,曼徹廣,
算法AS136:
AK-MeansClusteringAlgorithm
應用統計學,
第28卷,1979年第1號,第100-108頁。
示例Thesourceofthisexampleis
Defaultoptionsareused。
v0(/1.0,1.5,3.0,5.0,3.5,4.5,3.5/);1變量
v1(/1.0,2.0,4.0,7.0AS136模具鋼多少錢一斤,5.0,5.0,4.5/);2nd變量
mdimsizes(v1);#觀察結果
N2;變量數量
k2;集群數量(用戶指定)
xnew((/n,m/),typeof(v1)," No_FillValue ")
x(0,:)v0
x(1,:)v1
clcntrkmeans_as136(x,k,False);使用默認選項
print(CLC NTR);(1.25,1.5)和(3.9,5.1)
輸出的一個編輯版本如下:
變量:clcntr
類型:浮子
總大小:16字節
4價值觀
維數:2
Dimensionsandsizes:[2]x[2](kcX(:,{-30:30},:);x(時間,緯度,經度)
;重新排序
xrx(緯度|:,經度|:,時間|:);制造“時間”(觀察;m)更右側尺寸
;更后,lona是“變量”(N)
k3;集群數量(用戶指定)
optTrue
opt@iseed1
clcntrkmeans_as136(xr,k,opt);inputthereorderedarray
:;clcntr(3,nlat,mlon)
刪除(xr);deleteifnolongerneeded(不需要)蘇州東锜公司自成立以來,一直秉承“誠信、務實、高效、創新”的企業精神,將這種精神融入到企業的經營管理和工作實踐中,贏得了社會各界的信任和尊重。我公司多次被評為“蘇州市鋼材營銷企業50強”、“中國鋼材營銷企業100強”,被中國質量檢驗協會評為“全國優質服務誠信示范企業”、“全國行業質量示范企業”。
本文部分內容來源于網絡,我們僅作為信息分享。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。如發現本站有涉嫌抄襲侵權/違法違規的內容,請發送郵件至tokaits@163.com舉報,一經查實,本站將立刻刪除。
下一篇:sus430單價_日本