[19223] in s-news-athena
[S] An error in pruning a tree using a test data set
daemon@ATHENA.MIT.EDU (Yu, Chang)
Tue Sep 14 17:25:21 1999
Date: Tue, 14 Sep 1999 16:01:56 -0400
From: "Yu, Chang" <chang_yu@merck.com>
To: "'S-News'" <s-news@wubios.wustl.edu>
Message-Id: <1161B9F1E3E5D111A25700A02461F2AB025C77BF@usrymx04.merck.com>
Mime-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 7BIT
Hi, dear all,
I grew a tree using a training data set. Then I tried to prune it using a
test data set. And I got this error message which I don't understand.
> prune.t1 <- prune.tree(tree1,newdata=testing)
Error in .C("VR_dev3",: subroutine VR_dev3: 19 missing value(s) in a
rgument 6
Dumped
I appreciate any hints. Program follows. It seems the functin call doesn't
like argument "newdata=testing".
Please reply to me directly. I'll summarize for the list. Many thanks.
Chang Yu
Merck Research Labs
# set up data sets
x<-runif(length(input.data[,1]))
p<-0.50 # percentage for the testing sample
training<-input.data[x>p,]
testing<-input.data[x<=p,]
model<-fev~fev.b+pred.b+pctrev.b
# grow a tree
tree1<-tree(model,training,na.action=na.omit)
plot(tree1,type="u");text(tree1)
title("Full tree, fev~fev.b+pred.b+pctrev.b, training")
# Prune the tree
prune.t1 <- prune.tree(tree1,newdata=testing)
plot(prune.t1)
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news