尝试在调用“train”()的执行过程之前获取r输出 [英] attempting to obtain r output before invoking execution process for "train"()
问题描述
尝试运行此代码导致以下错误"尝试在调用执行过程之前获取r输出"
rpart.cv.1 = train(Label~。 ,data = test_tokens.df,method =" rpart",
trControl = cv.cntrl,tuneLength = 7)
完整代码
库(插入符号) >
#test_tokens.df = cbind(Label = test_data $ Sentiment,as.data.frame(test_token_matrix))
#names(test_tokens .df)< - make.names(names(test_tokens.df))
set.seed(48743)
cv.folds = createMultiFolds(test_data $ Sentiment,k = 10,次= 3)
cv.cntrl = trainControl(method =" repeatedcv",number = 10,repeats = 3,index = cv.folds)
#install.packages(" doSNOW")
library(doSNOW)
start.time = Sys.time()
cl = makeCluster(2,type =" SOCK")
registerDoSNOW(cl)
rpart.cv.1 = train(标签〜。,data = test_tokens.df,method =" rpart",
&NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; trControl = cv.cntrl,tuneLength = 7)
stopCluster(cl)
总时间= Sys.time() - start.time
总时间
rpart.cv.1
您好,
您似乎正在尝试安装一些已预装在Azure Machine Learning Studio中的软件包。能帮我们检查吗?
问候,
宇通
trying to run this code is causing the following error "attempting to obtain r output before invoking execution process"
rpart.cv.1 = train(Label ~ .,data = test_tokens.df,method = "rpart",
trControl = cv.cntrl, tuneLength = 7)
full code
library(caret)
#test_tokens.df= cbind(Label=test_data$Sentiment,as.data.frame(test_token_matrix))
#names(test_tokens.df) <- make.names(names(test_tokens.df))
set.seed(48743)
cv.folds = createMultiFolds(test_data$Sentiment,k = 10,times = 3)
cv.cntrl = trainControl(method = "repeatedcv", number = 10,repeats = 3, index = cv.folds)
#install.packages("doSNOW")
library(doSNOW)
start.time = Sys.time()
cl = makeCluster(2 ,type = "SOCK")
registerDoSNOW(cl)
rpart.cv.1 = train(Label ~ .,data = test_tokens.df,method = "rpart",
trControl = cv.cntrl, tuneLength = 7)
stopCluster(cl)
totaltime = Sys.time() - start.time
totaltime
rpart.cv.1
Hi,
It seems that you are trying to install some packages which are already pre-installed in Azure Machine Learning Studio. Could you please help us to check?
Regards,
Yutong
这篇关于尝试在调用“train”()的执行过程之前获取r输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!