[R] script execution stops and give the error

Neha gupta neh@@bo|ogn@90 @end|ng |rom gm@||@com
Sat Dec 21 00:46:55 CET 2019


This is the whole code I provided except the libraries such as

library(caret)
library(randomForest)

data=read.csv("fault.csv")

inTraining <- createDataPartition(data$bug , p = .75,list = FALSE)
training <- data [inTraining, ]
testings <- data [-inTraining, ]
ctrol = trainControl(method = "repeatedcv", number=5)
myTrain <- train(bug ~ ., data = training,
                     method = "rf",
                    tuneLength = 15,
                     metric = "MAE",
                     preProc = c("center", "scale", "zv"),
                     trControl = ctrol)

On Sat, Dec 21, 2019 at 12:23 AM Neha gupta <neha.bologna90 using gmail.com>
wrote:

>
> The code is described below: I need to find the RMSE and MAE
>
> ///read data which have data types of integer and number.
> data=read.csv("fault.csv")
>
> inTraining <- createDataPartition(data$bug , p = .75,list = FALSE)
> training <- data [inTraining, ]
> testings <- data [-inTraining, ]
> ctrol = trainControl(method = "repeatedcv", number=5)
> myTrain <- train(bug ~ ., data = training,
>                      method = "rf",
>                     tuneLength = 15,
>                      metric = "MAE",
>                      preProc = c("center", "scale", "zv"),
>                      trControl = ctrol)
>
> On Fri, Dec 20, 2019 at 11:31 PM Neha gupta <neha.bologna90 using gmail.com>
> wrote:
>
>>   When I run my code, I get the following error and suddenly the
>> execution of the script stops. Where in my data is the problem?
>>
>> Something is wrong; all the MAE metric values are missing:
>>       RMSE        Rsquared        MAE
>>  Min.   : NA   Min.   : NA   Min.   : NA
>>  1st Qu.: NA   1st Qu.: NA   1st Qu.: NA
>>  Median : NA   Median : NA   Median : NA
>>  Mean   :NaN   Mean   :NaN   Mean   :NaN
>>  3rd Qu.: NA   3rd Qu.: NA   3rd Qu.: NA
>>  Max.   : NA   Max.   : NA   Max.   : NA
>>  NA's   :8     NA's   :8     NA's   :8
>> Error: Stopping
>>
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list