我已经在 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.
非常感谢任何帮助。