none
attempting to obtain r output before invoking execution process for "train"()

    Question

  • 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


    Monday, February 11, 2019 12:35 PM

All replies

  • 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

    Tuesday, February 12, 2019 5:12 AM
    Moderator
  • Hi,

    only one line is causing the error 

    train(Label ~ .,data = test_tokens.df,method = "rpart",
                       trControl = cv.cntrl, tuneLength = 7)

    commenting out this line, the error seems to go away.

    I am not able to apply the train model

    Tuesday, February 12, 2019 9:32 AM
  • Hi, 

    I am not sure if this 'Create R Model' might be an alternative approach: https://docs.microsoft.com/en-us/azure/machine-learning/studio-module-reference/create-r-model

    Regards,
    Jaya

    Tuesday, February 12, 2019 8:50 PM