Hello,

I need to classify (i.e., export a vector with terminal node id's) new cases
using a ctree (party package) model based on different cases (learning
sample).

I tried the where command with the following syntax:

> where(tree, newdata=data2)

expecting to get terminal nodes of data2 cases based on rules of tree model
(data1 as learning sample). However it returned the following error message:

Error in checkData(oldData, RET) : 
  Classes of new data do not match original data

Party documentation states that I can use this command both for learning
sample (newdata=NULL) or new observations.

What am I doing wrong?

Best wishes

Joao Daniel
-- 
View this message in context: 
http://r.789695.n4.nabble.com/Where-command-in-ctree-party-tp3264187p3264187.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
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.

Reply via email to