Displaying 20 results from an estimated 4000 matches similar to: "rpart$where and predict.rpart"
2008 Jul 31
1
predict rpart: new data has new level
Hi. I uses rpart to build a regression tree. Y is continuous. Now, I try
to predict on a new set of data. In the new set of data, one of my x (call
Incoterm, a factor) has a new level.
I wonder why the error below appears as the guide says "For factor
predictors, if an observation contains a level not used to grow the tree, it
is left at the deepest possible node and
2008 Jul 21
2
CART and CHAID
Can I say that RPART is a modified algo of CART and PARTY a modified of
CHAID?
Thanks.
----
Chua Siang Li
Consultant - Operations Research
Acceval Pte Ltd
Tel: 6297 8740
Email: siang.li.chua at acceval-intl.com
Website: www.acceval-intl.com
This message and any attachments (the "message"...{{dropped:12}}
2008 Aug 05
1
Extracting variable names of final model in stepAIC
Hello there. I uses the following codes for the purpose of variable
selection.
> lmModel <- lm(y~.,data.frame(y=y, x=x))
> step <- stepAIC(lmModel, direction="both")
> step$anova
Stepwise Model Path
Analysis of Deviance Table
Initial Model:
y ~ x.Market.Price + x.Quantity + x.Country + x.Incoterm + x.Channel +
x.PaymentTerm
Final
2008 Aug 19
1
nonlinear constrained optimization
Hi. I need some advises on how to use R to find pi (i is the index) with
the following objective function and constraint:
max (sum i)[ f(ai, bi, pi) * g(ci, di, pi) * Di ]
s.t. (sum i)[ f(ai, bi, pi) * Di * pi] / (sum i)[ f(ai, bi, pi) * Di ] <=
constant
f and g are diffentiable.
So, I am thinking of optim with method = "BFGS"? But wonder how to include
the
2008 Jun 18
3
Cluster on both categorical and numerical data
Hello there. Is there any function in R that can do cluster on a set of
data that has both categorical and numerical variables? thanks.
siangli
2008 Sep 16
0
Warning messages after auto.arima
Dear R-helpers.
Would appreciate if someone can explain the warning messages below, after
auto.arima. I couldn't find any clue in the archived help.
Also, how do I retrieve the AICs of each tried model in auto.arima? The
purposes are (1) to output to a text file, and (2) to find the 2nd best
model by finding 2nd lowest AIC instead of eyeballing thru the value at the
console
2008 Oct 15
1
Forecasting using ARIMAX
Dear R-helpers,
I would appreicate if someone can help me on the transfer parameter in ARIMAX and also see what I am doing is correct.
I am using ARIMAX with 2 Exogeneous Variables and 10 years data are as follows:
DepVar Period, depVar, IndepVar1 Period, indepVar1, IndepVar2 Period, indepVar2
Jan 1998,708,Jan 1998,495,Jan 1998,245.490
Feb 1998,670,Feb 1998,421.25,Feb 1998,288.170
Mar
2008 Feb 26
1
predict.rpart question
Dear All,
I have a question regarding predict.rpart. I use
rpart to build classification and regression trees and I deal with data with
relatively large number of input variables (predictors). For example, I build an
rpart model like this
rpartModel <- rpart(Y ~ X, method="class",
minsplit =1, minbucket=nMinBucket,cp=nCp);
and get predictors used in building the model like
2008 Jul 03
1
Otpmial initial centroid in kmeans
Helo there. I am using kmeans of base package to cluster my customers. As
the results of kmeans is dependent on the initial centroid, may I know:
1) how can we specify the centroid in the R function? (I don't want random
starting pt)
2) how to determine the optimal (if not, a good) centroid to start with? (I
am not after the fixed seed solution as it only ensure that the
2006 Feb 07
2
guideline for plug-in to icecast2 server
hi
i have switch to using oddcast under window platform and now using icecastwin32 as server in this case is there any possible way to let icecastwin32 to stream Wma? pls advise thanks you
-----Original Message-----
From: Geoff Shang [mailto:geoff@hitsandpieces.net]
Sent: Wednesday, February 08, 2006 1:06 PM
To: Neo Jiun Siang - R&D
Cc: icecast@xiph.org; njsalan@hotmail.com
Subject: RE:
2006 Feb 07
1
guideline for plug-in to icecast2 server
thanks alot Geoff by the way is there any possible ways to add plug-in to icecast2 server to stream Wma? regardless of the license problem
-----Original Message-----
From: Geoff Shang [mailto:geoff@hitsandpieces.net]
Sent: Tuesday, February 07, 2006 8:08 PM
To: Neo Jiun Siang - R&D
Cc: icecast@xiph.org; njsalan@hotmail.com
Subject: RE: [Icecast] guideline for plug-in to icecast2 server
Neo
2006 Feb 07
1
guideline for plug-in to icecast2 server
hi
actually im trying to add feature to ices2 to able to stream mix file format such as
ogg and mp3 in the same playlist.m3u without extra decoding and encoding that function like ezstream. the reason i dont want to use ezstream as source client becoz after going thru decoding and encoding, the audio quality drops. Therefore im trying to find out is there any easy way out to add plug-in to
2009 Jun 09
3
rpart - the xval argument in rpart.control and in xpred.rpart
Dear R users,
I'm working with the rpart package and want to evaluate the performance of
user defined split functions.
I have some problems in understanding the meaning of the xval argument in
the two functions rpart.control and xpred.rpart. In the former it is defined
as the number of cross-validations while in the latter it is defined as the
number of cross-validation groups. If I am
2018 Aug 14
2
Xenial rpart package on CRAN built with wrong R version?
Hello,
I just upgraded my Ubuntu Xenial system to R 3.5.1 (from 3.4.?) by changing the sources.list entry and doing an "apt-get dist-upgrade". Everything works except loading the rpart package in R:
> library(rpart)
Error: package or namespace load failed for ?rpart?:
package ?rpart? was installed by an R version with different internals; it needs to be reinstalled for use with
2004 May 13
2
R 1.9.0 and pred.rpart
I have just upgraded from R 1.7.3 to R 1.9.0 and have found that the
predict function no longer works for rpart:
> predict(hmmm,sim3[1:10,])
Error in predict.rpart(hmmm, sim3[1:10, ]) :
couldn't find function "pred.rpart"
I have re-installed the rpart package to no avail. Any ideas?
Giles Hooker
2011 Sep 07
2
rpart/tree issue
I am trying to create a classification tree using either tree or rpart
but when it comes to plotting the results the formatting I get is
different than what I see in all the tutorials. What I would like to
see is the XX/XX format but all I get is a weird decimal value. I was
also wondering how you know which is yes and which is no in each leaf of
the tree? Is yes always on the left?
2011 Aug 25
2
rpart: plot without scientific notation
While I'm very pleased with the results I get with rpart and
rpart.plot, I would like to change the scientific notation of the
dependent variable in the plots into integers. Right now all my 5 or
more digit numbers are displayed using scientific notation.
I managed to find this:
http://tolstoy.newcastle.edu.au/R/e8/help/09/12/8423.html
but I do not fully understand what to change, and to
2014 Aug 13
1
Request to review a patch for rpart
Dear list
For my work, it would be helpful if rpart worked seamlessly with an
empty model:
library(rpart); rpart(formula=y~0, data=data.frame(y=factor(1:10)))
Currently, an unrelated error (originating from na.rpart) is thrown.
At some point in the near future, I'd like to release a package to CRAN
which uses rpart and relies on that functionality. I have prepared a
patch (minor
2007 Feb 15
2
Does rpart package have some requirements on the original data set?
Hi,
I am currently studying Decision Trees by using rpart package in R. I
artificially created a data set which includes the dependant variable
(y) and a few independent variables (x1, x2...). The dependant variable
y only comprises 0 and 1. 90% of y are 1 and 10% of y are 0. When I
apply rpart to it, there is no splitting at all.
I am wondering whether this is because of the
2006 Aug 09
2
How to draw the decision boundaries for LDA and Rpart object
Hello useR,
Could you please tell me how to draw the decision boundaries in a scatterplot of the original data for a LDA or Rpart object.
For example:
> library(rpart)
>fit.rpart <- rpart(as.factor(group.id)~., data=data.frame(Data) )
How can I draw the cutting lines on the orignial Data?
Or is there any built in functions that can read the rpart object 'fit.rpart' to do