如何使用腳本複製隨機森林的列貢獻清單?謝謝專家!
dt = Open( "$SAMPLE_DATA/Diabetes.jmp" );
p= dt << Bootstrap Forest(
Y( :Y ),
X(
:Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH,
:LTG, :Glucose
),
Validation( :Validation ),
Minimum Splits Per Tree( 5 ),
Portion Bootstrap( 1 ),
Number Terms( 3 ),
Number Trees( 25 ),
Go
);
p_report = p << Report;
tb = p_report << XPath("//OutlineBox[text()='列贡献']//TableBox");
沒有工作

自動化和腳本回覆:如何使用腳本複製隨機森林的列貢獻清單?
回覆:如何使用腳本複製隨機森林的列貢獻清單?使用 Make Into Data 表,從中取得來源腳本並根據需要進行修改
Names Default To Here(1);
rpt = New Window("Diabetes - Bootstrap Forest of Y",
Data Table("Diabetes") << Bootstrap Forest(
Y(:Y),
X(
:Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG,
:Glucose
),
Validation(:Validation),
Method("Bootstrap Forest"),
Column Contributions(1),
Minimum Splits per Tree(5),
Portion Bootstrap(1),
Number Terms(3),
Number Trees(25),
Go
)
);
Wait(0);
rpt["Bootstrap Forest for Y", "Column Contributions", Table Box(1)] <<
Make Into Data Table;
rpt << Close Window;
看更多...
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Diabetes.jmp");
bsf = dt << Bootstrap Forest(
Y(:Y),
X(:Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose),
Validation(:Validation),
Minimum Splits Per Tree(5),
Portion Bootstrap(1),
Number Terms(3),
Number Trees(25),
Column Contributions(1),
Go
);
Wait(0);
dt_res = Report(bsf)[Outline Box("Bootstrap Forest for ?"), Outline Box("Column Contributions"), Table Box(1)] << Make Into Data Table(Invisible);
m = dt_res[0, 0];
Close(dt_res, no save);
// could also
m = Report(bsf)[Outline Box("Bootstrap Forest for ?"), Outline Box("Column Contributions"), Table Box(1)] << get;
如果您只想要列,您可以從結果清單中建立它,或者
m = Report(bsf)[Outline Box("Bootstrap Forest for ?"), Outline Box("Column Contributions"), Table Box(1), StringColBox("Term")] << Copy Column;
回覆:如何使用腳本複製隨機森林的列貢獻清單?我用自己的實際數據仍然沒有成功。
dt=Current Data Table();for(i=5,i<=ncol(dt),i++,if(Column(i)<
<GET name="=" xx=""></GET>
<P><SPAN><SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2025-06-21_16-23-00.png" style="width: 946px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="2025-06-21_16-23-00.png" style="width: 946px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="2025-06-21_16-23-00.png" style="width: 946px;"><span class="lia-inline-image-display-wrapper" image-alt="2025-06-21_16-23-00.png" style="width: 946px;"><img src="https://us.v-cdn.net/6038925/uploads/images/77144i26A8E679104F5A8A/2025-06-21_16-23-00.png" role="button" title="2025-06-21_16-23-00.png" alt="2025-06-21_16-23-00.png" /></span></SPAN></SPAN></SPAN></SPAN></P>
回覆:如何使用腳本複製隨機森林的列貢獻清單?我用的是JMP的中文版,但運行這個程式碼是可行的。
dt = Open( "$SAMPLE_DATA/Diabetes.jmp" );
cNa=dt<
<GET column="" names=""></GET>
回覆:如何使用腳本複製隨機森林的列貢獻清單?注意到我們的腳本之間的差異了嗎?
看更多......
我使用的輪廓框名稱與您不同,因為我故意使用通配符 ? 來替換列名稱
您可以跳過第一個輪廓框引用,但它仍然有效。