From: Tak Kaneko (nospam@nospamcam.ac.uk)
Date: Tue 08 May 2001 - 03:04:29 EST
Message-ID: <Pine.SOL.4.33.0105071803300.10327-100000@green.csi.cam.ac.uk>
Hi
I'm trying to use the "tree" package in R to predict intonation for a
speech synthesiser and when I feed the feature vector into the tree,
I want to get the predicted value and the deviance associated with that
node.
Q.1
--- I was hoping that the following command will return a tree object of the predicted values, but I get the following error:------------------------------------------------------------ > test.tr <- predict.tree(pr,test.data,type="tree") Error in as.list(X) : Object "response.names" not found
where: pr = A tree was grown using the training data and then pruned back to where the deviance was minimised when a separate test data set was used. "pr" is this pruned tree.
test.data = test data with the features and response -------------------------------------------------------------
How would I be able to access the prediction and the deviance? Would this work if the data was a feature vector with no responses? (as would be the case when it comes to predicting the real thing).
Q.2 --- Assuming that the distribution of the data at each node is Gaussian, I'd like to model each node as a gaussian probability density function with a mean at the predicted value and variance, which is presumably related to the deviance...
I've found out the definition for the deviance from the S-plus manual but it's not yet clear to me. So how could I deduce the variance of a value predicted by "tree"?
Thanks and I'd be grateful if you could also reply to my address above (nospam@nospamuk).
Tak Kaneko
-------------------------------------------------------- Mobile: 07866 581 806 Cambridge Tel: 01223 711 160 Permanent e-mail: nospam@nospamrg Home: Tel (01494) 680 230 11 Oldbury Grove, Beaconsfield, Bucks HP9 2AJ
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
This archive was generated by hypermail 2b30 : Fri 22 Jun 2001 - 18:58:41 EST