cuttree_dt_JPH {lazy.tree} | R Documentation |
決定木をある深さで切断する.
English help file: cuttree_dt
cuttree_dt( obj, depth, y=NULL, nofimport=0, nosummary=0
, print=0, plot=0, title="" )
obj |
|
depth |
木の深度 |
y |
基準変数ベクトル (Not Used) |
nofimport |
= 1 重要度の計算をしない |
nosummary |
= 1 結果の要約を計算をしない |
print |
= 1 結果を印刷 |
plot |
= 1 結果をプロット |
title |
タイトル文字列 |
DecTree
クラスオブジェクト.
Xc <- data.frame(x1=as.factor(square$x1),x2=as.factor(square$x2))
res1 <- DecTree( square$Class4, Xc, minnobs=1, eps=0, method=4, print=3
, plot=0, maxdepth=4, title="square:" )
res2 <- DecTree( square$Class4, Xc, minnobs=1, eps=0, method=4, print=3
, plot=0, maxdepth=3, title="square:" )
rescut <- cuttree_dt( res1, 3, print=1 )
Print(res1$mllh, res2$mllh, rescut$mllh)
Print(res1$weightedF1, res2$weightedF1, rescut$weightedF1)
Print(res2$SCT, "/", rescut$SCT, fmt="5.3")
# statname <- c("depth","parent","Left","Right","nobs","score", "ImpMeasure")
# summary <- get_valLL( rescut$node, statname, simplify=2 )
# Print(summary)
# plot tree
# library(igraph)
# plot_dt( rescut )
# @keywords internal