如何在標準最小二乘回歸中使用 JMP 腳本自動進行不同的驗證(訓練和驗證)?
我想進行 1000 次標準最小二乘回歸,並且每次都進行新的驗證。 而且我不知道如何通過編寫腳本來自動執行此操作。
我知道,例如,在預測建模神經網絡中,我們可以編寫----驗證方法( “退縮” , 0.1 ). 但我不知道如何在最小二乘法中做到這一點。
如果我選擇一個固定的驗證列,在回歸分析的腳本中,會有這些行:
在哪裡(格式(:驗證)== “訓練” )
在哪裡(格式(:驗證)== “驗證” )
您在使用 JMP Pro 嗎? 如果您使用 JMP 構建驗證列並在平台中使用驗證角色,則可能會出現這種情況。
如果我是你,我會右鍵單擊我想要引導的統計數據,然後從彈出菜單的底部選擇引導選項。
或者你可以用艱難的方式做到這一點..
(此腳本具有 JMP Pro 功能)
names default to here(1);
dt=New Table( "Some data",
Add Rows( 20 ),
New Column( "Response",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[-1.82545036264736, 0.728246959467525, -1.00696633045675,
-1.94845973713604, -0.0621517489644272, 1.31940922160903,
-1.39078111154494, 2.44117449478401, -0.209184441663871,
-1.09379674103266, 1.64814151733151, -1.31764655696586,
0.0254040089481649, -0.755512000894789, -1.2826579879211,
0.589914544061201, 2.36144445064629, 0.379635414475524,
-3.78801173090372, -0.434943374358309]
)
),
New Column( "Factor",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[-1.6221491198447, 1.28782659216483, -2.76536700522009,
-1.94258144594943, -0.66656328643386, 1.22476702284507,
-1.92374219399329, 0.343884151691415, -0.0708634559705932,
-1.96753984956401, 2.36508689631865, -1.3102347891645,
-0.359555016603859, -1.89982154229024, -2.31502621519621,
1.18810219397683, 1.7928172570621, 1.19417348867999, -1.68736902315671,
0.0111059935344733]
)
)
);
dtc=New Table( "Crossvalidation table",
Add Rows( 0 ),
New Column( "RSquare",
Numeric,
"Continuous",
Format( "Fixed Dec", 12, 4 ),
Set Selected,
Set Values( [] )
),
New Column( "RASE",
Numeric,
"Continuous",
Format( "Fixed Dec", 12, 5 ),
Set Selected,
Set Values( [] )
),
New Column( "Freq",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Selected,
Set Values( [] )
)
);
for (i=1, i<=10, i++,
dt<<MAKE validation="" column=""></MAKE>