for i=1:50
DATASET ACTIVATE DataSet1.
QUICK CLUSTER ZlnPrice ZCPUGhz ZWeightgramm ZDisplayinch ZCameraMp
/MISSING=LISTWISE
/CRITERIA=CLUSTER(i) MXITER(10) CONVERGE(0)
/METHOD=KMEANS(NOUPDATE)
/PRINT INITIAL.
end
我想将CLUSTER(i)从1循环到50.我怎样才能解决这个问题?我想避免蛮力。
答案 0 :(得分:0)
有几种方法。一个是制作宏观功能。
define !myloops()
!do !i = 1 !to 50
QUICK CLUSTER ZlnPrice ZCPUGhz ZWeightgramm ZDisplayinch ZCameraMp
/MISSING=LISTWISE
/CRITERIA=CLUSTER(i) MXITER(10) CONVERGE(0)
/METHOD=KMEANS(NOUPDATE)
/PRINT INITIAL.
!doend
!enddefine.
Select and Run that - read into processor memory.
Then issue commands.
DATASET ACTIVATE DataSet1.
!myloops.
You're there.