⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 plot.randomforest.r

📁 是基于linux系统的C++程序
💻 R
字号:
plot.randomForest <- function(x, type="l", main=deparse(substitute(x)), ...) {  if(x$type == "unsupervised")    stop("No plot for unsupervised randomForest.")  test <- !(is.null(x$test$mse) || is.null(x$test$err.rate))  if(x$type == "regression") {    err <- x$mse    if(test) err <- cbind(err, x$test$mse)  } else {    err <- x$err.rate    if(test) err <- cbind(err, x$test$err.rate)  }  if(test) {    colnames(err) <- c("OOB", "Test")    matplot(1:x$ntree, err, type = type, xlab="trees", ylab="Error",            main=main, ...)  } else {    matplot(1:x$ntree, err, type = type, xlab="trees", ylab="Error",            main=main, ...)  }  invisible(err)}  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -