Hello,
I get the following error when I use the ROSE class balancing method but
when I use other methods like SMOTE, up, down, I do not get any error
message.
Something is wrong; all the ROC metric values are missing:
ROC Sens Spec
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
library(DMwR)
d=readARFF("bughunter.arff")
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]]
On 7/22/20 3:43 PM, Neha gupta wrote:> Hello, > > > I get the following error when I use the ROSE class balancing method but > when I use other methods like SMOTE, up, down, I do not get any error > message. > > > Something is wrong; all the ROC metric values are missing: > > ROC Sens Spec > > 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 > > > > library(DMwR) > > d=readARFF("bughunter.arff")After installing that package and loading pkg:DMwR I get: Error in readARFF("bughunter.arff") : could not find function "readARFF" Since you also posted in HTML, I suggest you read the Posting Guide, restart and R session and post a reproducible example that loads all needed packages and data. -- David.> > 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]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
On 2020-07-22 16:08 -0700, David Winsemius wrote:
| On 7/22/20 3:43 PM, Neha gupta wrote:
| | Hello,
| |
| | I get the following error when I use
| | the ROSE class balancing method but
| | when I use other methods like SMOTE,
| | up, down, I do not get any error
| | message.
| |
| | Something is wrong; all the ROC
| | metric values are missing:
| |
| | ROC Sens Spec
| | 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
| |
| | library(DMwR)
| | d=readARFF("bughunter.arff")
|
| After installing that package and
| loading pkg:DMwR I get:
|
| Error in readARFF("bughunter.arff") : could not find function
"readARFF"
*Psst* ... I think this is
farff::readARFF ... Where is
"bughunter.arff" from?
| | [[alternative HTML version deleted]]
|
| Since you also posted in HTML, I
| suggest you read the Posting Guide,
| restart and R session and post a
| reproducible example that loads all
| needed packages and data.
Hear, hear
| | index <- createDataPartition(d$`Bug class`, p = .70,list = FALSE)
Maybe this is
caret::createDataPartition?
| | tr <- d[index, ]
| |
| | ts <- d[-index, ]
| |
| | boot3 <- trainControl(method = "repeatedcv", number=10,
| | repeats=10,classProbs = TRUE,verboseIter = FALSE,
Also caret ... ?caret::trainControl
| | summaryFunction = twoClassSummary, sampling = "rose")
Missing ?(? also perhaps other params
have fallen off here ? The C looks like
a paranthesis because of camel-case
maybe ... hmmm ...
| | set.seed(30218)
| |
| | ct <- train(`Bug class` ~ ., data = tr,
| | method = "pls",
| | metric = "AUC",
| | preProc = c("center", "scale", "nzv"),
| | trControl = boot3)
| |
| | getTrainPerf(ct)
|
V
r
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL:
<https://stat.ethz.ch/pipermail/r-help/attachments/20200723/c2f5b7dc/attachment.sig>
Hello David, thanks for your reply. I have added the information.
library(caret)
library(farff)
library(DMwR)
d=readARFF("bughunter.arff")
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)
On Thu, Jul 23, 2020 at 1:08 AM David Winsemius <dwinsemius at
comcast.net>
wrote:
>
> On 7/22/20 3:43 PM, Neha gupta wrote:
> > Hello,
> >
> >
> > I get the following error when I use the ROSE class balancing method
but
> > when I use other methods like SMOTE, up, down, I do not get any error
> > message.
> >
> >
> > Something is wrong; all the ROC metric values are missing:
> >
> > ROC Sens Spec
> >
> > 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
> >
> >
> >
> > library(DMwR)
> >
> > d=readARFF("bughunter.arff")
>
> After installing that package and loading pkg:DMwR I get:
>
>
> Error in readARFF("bughunter.arff") : could not find function
"readARFF"
>
>
> Since you also posted in HTML, I suggest you read the Posting Guide,
> restart and R session and post a reproducible example that loads all
> needed packages and data.
>
> --
>
> David.
>
> >
> > 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]]
> >
> > ______________________________________________
> > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>
[[alternative HTML version deleted]]