[R] Error in Rose Method (class balancing)
David Winsemius
dw|n@em|u@ @end|ng |rom comc@@t@net
Thu Jul 23 17:39:07 CEST 2020
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)
>
> getTrainPerf(ct)
>
[[alternative HTML version deleted]]
More information about the R-help
mailing list