similar to: RPART - printing full splitting rule number on tree plot

Displaying 20 results from an estimated 400 matches similar to: "RPART - printing full splitting rule number on tree plot"

2007 Aug 17
2
for plots
Hi, All, I am a beginner for R. Now I have installed R 2.5.1 in Window environment. After I run a program such as "gam" I would like to display a plot for the object. The following is an example. When I did this, only the last plot was presented on my screen. How can I get a plot before the last plot? I mean if the object has several plots how can I get those? "gam.object <-
2010 Jun 24
1
?to calculate sth for groups defined between points in one variable (string), / value separating/ spliting variable into groups by i.e. between start, NA, NA, stop1, start2, NA, stop2
Dear useRs, Thanks for any advices # I do not know where are the examples how to mark groups # based on signal occurence in the additional variable: cf. variable c2, # How to calculate different calculations for groups defined by (split by occurence of c2 characteristic data) #First example of simple data #mexample 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
2011 May 12
1
Saving misclassified records into dataframe within a loop
Greetings R world, I know some version of the this question has been asked before, but i need to save the output of a loop into a data frame to eventually be written to a postgres data base with dbWriteTable. Some background. I have developed classifications models to help identify problem accounts. The logic is this, if the model classifies the record as including variable X and it turns out
2012 Dec 28
2
[LLVMdev] Can simplifycfg kill llvm.lifetime intrinsics?
> Suppose you have four lifetime operations on the same address in memory, > with loads and stores all around them: > > start1--end1 .. start2--end2 > > If you remove start1 then you have a bare pointer, the memory came from > somewhere and you lose the optimization that loads before start1 become > undef, but you don't miscompile. This is assuming no looping after
2012 Dec 28
0
[LLVMdev] Can simplifycfg kill llvm.lifetime intrinsics?
On 12/27/2012 12:35 PM, Rafael Espíndola wrote: >>> Oh, I was reading "precedes/following" as having static (dominance) >>> meaning. That is, in the above example you could not delete the store >>> since it is not true that >>> llvm.lifetime.end dominates it. >>> >>> Nick, is this what you had in mind? If not, then we must delete a
2011 Jan 26
2
Extracting the terms from an rpart object
Hello all, I wish to extract the terms from an rpart object. Specifically, I would like to be able to know what is the response variable (so I could do some manipulation on it). But in general, such a method for rpart will also need to handle a "." case (see fit2) Here are two simple examples: fit1 <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis) fit1$call fit2 <-
2011 Apr 22
3
Parametrized object name in Save statement
Greetings All, I am looking to write a parametrized Rscript that will accept a variable name(that also is the name of the flat file), transform the data into a data frame and preform various modeling on the structure and save the output and plot of the model. In this example i am using a rpart decision tree. The only problem i am having is integrating the parameter into the internal object name
2012 Mar 04
1
rpart package, text function, and round of class counts
I run the following code: library(rpart) data(kyphosis) fit <- rpart(Kyphosis ~ ., data=kyphosis) plot(fit) text(fit, use.n=TRUE) The text labels represent the count of each class at the leaf node. Unfortunately, the numbers are rounded and in scientific notation rather than the exact number of examples sorted by that node in each class. The plot is supposed to look like
2003 May 24
1
...listable functions...
Hi R-helpers. I have the following problem: I would like to apply my function gain(df,X,A) to a list of arguments. df is a data frame X,A are the varibales od data frame. When I do > gain(kyphosis,"Kyphosis",c("Start","Number")) [1] "Start" "Number" I get the following error... Error in unique.default(x) : unique() applies only to vectors I
2010 Dec 13
2
rpart.object help
Hi, Suppose i have generated an object using the following : fit <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis) And when i print fit, i get the following : n= 81 node), split, n, loss, yval, (yprob) * denotes terminal node 1) root 81 17 absent (0.7901235 0.2098765) 2) Start>=8.5 62 6 absent (0.9032258 0.0967742) 4) Start>=14.5 29 0 absent (1.0000000
2010 Jul 01
4
left end or right end
Dear all, I am a biologist. I have two sets of distance P(start1, end1) and Q(start2, end2). The distance will be like this. P ------------------------ Q ---------------------------------------- I want to know whether P falls closely to the right end or left end of Q. P and Q are of different lengths for each data point. There are more than 10000 pairs of P and Q. Is there any test or
2007 Jun 15
2
model.frame: how does one use it?
Philipp Benner reported a Debian bug report against r-cran-rpart aka rpart. In short, the issue has to do with how rpart evaluates a formula and supporting arguments, in particular 'weights'. A simple contrived example is ----------------------------------------------------------------------------- library(rpart) ## using data from help(rpart), set up simple example myformula <-
2011 Apr 06
2
Layout within levelplot from the lattice package
Hi, I'm a novice with levelplot and need some assistance! Basically, I want a window which contains 6 levelplots of equal size presented in 3 columns and 2 rows. I've tried to approach it two ways. The first way leads to this question: Is there any way to concatenate levelplots from a factor vertically as opposed to horizontally? I'd like to pair the levelplots by factor.2 on
2009 Feb 25
1
how to label the branches of a tree
Hi, I am using rpart package to fit classification trees. library(rpart) fit <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis) plot(fit,uniform=T) text(fit, use.n=TRUE) But I am unable to label the branches (not the nodes) of the tree. Can somebody help me out in this? Thank you, Regards Utkarsh Singhal | Amba Research Ph +91 80 3980 8017 | Mob +91 99 0295 8815
2009 Sep 14
1
summary of rpart-Object in tktext window?
Hi, is it possible to put a summary of an rpart-Object into a tktext-window? Here is what I'm trying to do: fit <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis) tt <- tktoplevel() tex <- tktext(tt) tkpack(tex) tkinsert(tex, "end", summary(fit)) But since the summary of an object is a list, I always get back the following error-message: cannot handle object of
2010 Mar 07
1
Is there an equivalence of lm's “anova” for an rpart object ?
Simple example: # Classification Tree with rpart library(rpart) # grow tree fit <- rpart(Kyphosis ~ Age + Number + Start, method="class", data=kyphosis) Now I would like to know how can I measure the "importance" of each of my three explanatory variables (Age, Number, Start) in the model? If this was a regression model, I could have looked at p values from the
2010 May 03
1
rpart, cross-validation errors question
I ran this code (several times) from the Quick-R web page ( http://www.statmethods.net/advstats/cart.html) but my cross-validation errors increase instead of decrease (same thing happens with an unrelated data set). Why does this happen? Am I doing something wrong? # Classification Tree with rpart library(rpart) # grow tree fit <- rpart(Kyphosis ~ Age + Number + Start,
2011 Aug 08
1
Classification trees problem.
Hello Everyone, I'm doing a Classification trees with categorical explanatory variables using library rpart and I would like to do a prediction for some data imputs. I don't know where's a function or how can I do it?. Is there someone can help ?? ¿. Here's the code that I'm using. library(rpart) fit <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis) plot(fit)
2012 Apr 12
2
enableJIT(2) causes major slow-up in rpart
Hello, Due to exploration of the JIT capabilities offered through the {compiler} package, I came by the fact that using enableJIT(2) can *slow* the rpart function (from the {rpart} package) by a magnitude of about 10 times. Here is an example code to run: library(rpart) require(compiler) enableJIT(0) # just making sure that JIT is off # We could also use enableJIT(1) and it would be fine fo
2011 Mar 31
2
fit.mult.impute() in Hmisc
I tried multiple imputation with aregImpute() and fit.mult.impute() in Hmisc 3.8-3 (June 2010) and R-2.12.1. The warning message below suggests that summary(f) of fit.mult.impute() would only use the last imputed data set. Thus, the whole imputation process is ignored. "Not using a Design fitting function; summary(fit) will use standard errors, t, P from last imputation only. Use