From sandro.saitta at gmail.com  Thu Aug 26 09:06:03 2010
From: sandro.saitta at gmail.com (clusty)
Date: Thu, 26 Aug 2010 00:06:03 -0700 (PDT)
Subject: [Rd] Decision tree and factor variables
Message-ID: <1282806363379-2339234.post@n4.nabble.com>


Hello,

I'm building a decision tree in R with the rpart package. Modeling is
fine. But when it comes to scoring, I have the following issue:

factor 'cust_language' has new level(s) OT

I think this comes from the fact that when learning, the DT doesn't
see all the possible value of the factor variable cust_language. When
scoring, new values comes and I get this error. However, it should not
be a problem to have new values for a factor variable when scoring
with decision tree.

Any idea on how I should handle the problem?
Thanks. 
-- 
View this message in context: http://r.789695.n4.nabble.com/Decision-tree-and-factor-variables-tp2339234p2339234.html
Sent from the R devel mailing list archive at Nabble.com.



[Rd] Decision tree and factor variables
clusty