首次运行后randomForestSRC中出现mlr错误

时间:2018-04-29 08:34:53

标签: r random-forest mlr

我在macOS 10.13.4上安装了Java 9.0.4和所有相关的R库,以便在R 3.5.0中运行以下脚本(在RStudio 1.1.423中调用):

options("java.home"="/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/lib")
Sys.setenv(LD_LIBRARY_PATH='$JAVA_HOME/server')
dyn.load('/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/lib/server/libjvm.dylib')

library(mlr)
library(tidyverse) # for ggplot and data wrangly
library(ggvis) # ggplot visualisation in shiny app
library(rJava)
library(FSelector)

data <- read.csv('week07/PhishingWebsites.csv')

# All variables to nominal (PhishingWebsites)
data[c(1:31)] <- lapply(data[c(1:31)] , factor)

# Configure a classification task and specify Result as the target feature.
classif.task <- makeClassifTask(id = "web", data = data, target = "Result")


fv <- generateFilterValuesData(classif.task)

第一次运行它时工作正常,但是如果我第二次运行它会出现以下错误:

Error in randomForestSRC::rfsrc(getTaskFormula(task), data = getTaskData(task),  : 
  An error has occurred in the grow algorithm.  Please turn trace on for further analysis.

任何帮助都非常感激。

0 个答案:

没有答案