簡體   English   中英

如何可視化R中的隨機森林model output?

[英]How to visualize random forest model output in R?

有沒有辦法在 R 中可視化隨機森林 output? 我在 python 中閱讀了一篇關於export_graphviz庫的文章,該文章使用輸出的 n_estimators 參數以 DOT 格式導出決策樹,然后用於生成決策樹的圖形表示。

我們在 R 有這樣的東西嗎?

也許你可以考慮像

library(randomForest)
library(reprtree)

model <- randomForest(Species ~ ., data = iris, importance = TRUE, ntree = 500, mtry = 2, do.trace = 100)

reprtree:::plot.getTree(model)

(參見https://stats.stackexchange.com/questions/41443/how-to-actually-plot-a-sample-tree-from-randomforestgettree

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM