AdaBoost ツリー (R の結果) を if-else 条件に変換する方法を知っている人はいますか?
R でパッケージを関数caret
と共に使用し、データセットでいくつかの予測を取得しました。train
method="ada"
listTreesAda
その後、パッケージ内の関数を使用しrattle
て構造を確認しました (以下のサンプル)。
n= 45211
node), split, n, loss, yval, (yprob)
* denotes terminal node
1) root 45211 5280 no (0.88321426 0.11678574)
2) duration< 551.5 40743 3245 no (0.92035442 0.07964558)
4) poutcome=failure,other,unknown 39451 2431 no (0.93837926 0.06162074) *
5) poutcome=success 1292 478 yes (0.36996904 0.63003096)
10) duration=132.5 1066 300 yes (0.28142589 0.71857411) *
3) duration>=551.5 4468 2035 no (0.54453894 0.45546106)
6) duration=835.5 1688 697 yes (0.41291469 0.58708531) *
if-else 条件でどのように読み取りますか? AdaBoost モデルの最終関数を自分で計算したい場合、どのように計算しますか? 木ごとの重み{w(1), w(2), ..., w(n)}
がある場合、この重みに正確に何を掛けますか? 応答変数が YES である最後の葉に対応するルールは? ... 応答変数が NO の場合は? ...ツリーの各if-elseルールで?
ご覧のとおり、私は少し迷っています。
(この投稿は次のものに関連しています: https://stats.stackexchange.com/questions/133088/use-adaboost-results-in-r-to-make-future-predictions-by-hand および https://stackoverflow.com /questions/27857619/r-error-using-drawtreesada-to-draw-an-ada-tree )