[R] Error in Rose Method (class balancing)

David Winsemius
Thu, 23 Jul 2020 15:39:07 -0000

On 7/23/20 7:01 AM, Neha gupta wrote:
>
> library(caret)
> library(farff)
> library(DMwR)
>
> d=readARFF("bughunter.arff")


Error in readARFF("bughunter.arff") :
 ? Assertion on 'path' failed: File does not exist:
'bughunter.arff'.


I say again:

> I suggest you read the Posting Guide,
> restart and R session and post a reproducible example that loads all
> needed packages and data.

--

David.


> dput( head( d, 30 ) )
>
> index <- createDataPartition(d$`Bug class`, p = .70,list = FALSE)
>
> tr <- d[index, ]
>
> ts <- d[-index, ]
>
> boot3 <- trainControl(method = "repeatedcv", number=10,
> repeats=10,classProbs = TRUE,verboseIter = FALSE,
>
> summaryFunction = twoClassSummary, sampling = "rose")
>
> set.seed(30218)
>
> ct <- train(`Bug class` ~ ., data = tr, method = "pls", metric
=
> "AUC", preProc = c("center", "scale",
"nzv"), trControl = boot3)