大家好!
我想使用JSL在決策樹中獲取默認的“最小大小分割”。
謝謝!

在取消選中首選項中的最小尺寸拆分(<<關)時,內部似乎是選項中顯示的默認值為5。如果設置了用戶的分區平台首選項,則設置值將用於您顯示的提示窗口和應用程序,除非它已更改。
如果您不想要用戶的首選項,請指定分區(Y(),X(),忽略平台首選項(1));
如果忽略平台首選項,則需要修改下面的腳本並假設默認最小大小為5。
這是一個腳本,用於捕獲用戶是否從首選項UI或分區UI設置首選項。
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Iris.jmp" );
obj = Partition(
Y( :Species ),
X( :Sepal length, :Sepal width, :Petal length, :Petal width ),
Informative Missing( 1 ),
Minimum Size Split(3)
);
obj << split best(2);<BR /><BR />//since you are letting the user do this, grab the window and get the script
scrp = (obj << get script); //if the minimum split size was set, can parse it from the script.
for(i=1, i<=narg(scrp), i++,
_tt = Arg(scrp, i);
if(Head Name(_tt) == "Minimum Size Split",
_sz = Arg(_tt,1);
Break();
)
);
_ppsz= Arg(Arg(get platform preferences(Partition(Minimum Size Split)), 1), 1);
if(Arg(_ppsz,1) == 0 & Is Missing(_sz), _sz=5,
Arg(_ppsz,1) >0 & Is Missing(_sz), _sz=Arg(_ppsz,1)
);
show(_sz);