ument, x, and didn't
> use the argument. Functions don't need arguments,
> f <- function() {
>
> }
> would do just as well.
>
> Bill Dunlap
> Spotfire, TIBCO Software
> wdunlap tibco.com
>
> > -Original Message-
> > Fr
On May 12, 2011, at 6:49 PM, John Dennison wrote:
It is little ugly i agree but it is acting as it should. I am trying
to capture the cases where the model produced a false positive but
only for one of the variables. ie where the model predicts "present"
but the case is "absent". I know th
r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of John Dennison
> Sent: Thursday, May 12, 2011 2:41 PM
> To: r-help@r-project.org
> Subject: Re: [R] Saving misclassified records into dataframe
> within a loop
>
> Having poked the problem a couple mor
It is little ugly i agree but it is acting as it should. I am trying to
capture the cases where the model produced a false positive but only for one
of the variables. ie where the model predicts "present" but the case is
"absent". I know this is only half of the misclassifications, but the
inverse
On May 12, 2011, at 6:26 PM, John Dennison wrote:
My apologies. I have transgressed the first law of posting, test
your code. here is an updated set this should run:
library(rpart)
# grow tree
fit <- rpart(Kyphosis ~ Age + Number + Start,
method="class", data=kyphosis)
#predict
prediction<
My apologies. I have transgressed the first law of posting, test your code.
here is an updated set this should run:
library(rpart)
# grow tree
fit <- rpart(Kyphosis ~ Age + Number + Start,
method="class", data=kyphosis)
#predict
prediction<-predict(fit, kyphosis)
#create output data.frame
resul
On May 12, 2011, at 5:41 PM, John Dennison wrote:
Having poked the problem a couple more times it appears my issue is
that the
object i save within the loop is not available after the function
ends. I
have no idea why it is acting in this manner.
library(rpart)
# grow tree
fit <- rpart(K
Having poked the problem a couple more times it appears my issue is that the
object i save within the loop is not available after the function ends. I
have no idea why it is acting in this manner.
library(rpart)
# grow tree
fit <- rpart(Kyphosis ~ Age + Number + Start,
method="class", data=kyph
John -
In your example, the misclassified observations (as defined by
your predict.function) will be
kyphosis[kyphosis$Kyphosis == 'absent' & prediction[,1] != 1,]
so you could start from there.
- Phil Spector
Greetings R world,
I know some version of the this question has been asked before, but i need
to save the output of a loop into a data frame to eventually be written to a
postgres data base with dbWriteTable. Some background. I have developed
classifications models to help identify problem account
10 matches
Mail list logo