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