Re: [R] Rpart help

2017-05-24 Thread peter dalgaard
> On 24 May 2017, at 04:38 , Bert Gunter wrote: > > 1. Forget Excel. Erase it from your memory. banish its paradigms from > your practices. Faiing to do so will only bring misery as you explore > R. R is a rational programming language primarily for data analysis, > statistics, and graphics. Exc

[R] rpart - plotcp find specificity and sensitivity

2016-06-30 Thread Parsa Akbari
Hi, I am using rpart to build a decision tree, I am then using printcp to find the cross-validation error (xerror) of different splits of the decision tree. I was wondering how I can use the rpart package to find sensitivity (false negative) and specificity (false positive) of cross-validation fo

Re: [R] Rpart plot produces no text

2016-06-29 Thread Achim Zeileis
io, reload it and try again. John Kane Kingston ON Canada -Original Message- From: jcthomp...@redlobster.com Sent: Tue, 28 Jun 2016 20:26:59 + To: r-help@r-project.org Subject: [R] Rpart plot produces no text I am using R Studio and am able to fit a tree with RPlot, however, the tree in

Re: [R] Rpart plot produces no text

2016-06-29 Thread John Kane
nal Message- > From: jcthomp...@redlobster.com > Sent: Tue, 28 Jun 2016 20:26:59 + > To: r-help@r-project.org > Subject: [R] Rpart plot produces no text > > I am using R Studio and am able to fit a tree with RPlot, however, the > tree in the viewer has no text (see i

[R] Rpart plot produces no text

2016-06-28 Thread Thompson, James
I am using R Studio and am able to fit a tree with RPlot, however, the tree in the viewer has no text (see image attached). Jim Thompson This e-mail message is for the sole use of the intended recipient and may contain information that is confidential, proprietary or privileged. Any unauthorize

[R] rpart and survey weights

2016-01-27 Thread Erofili Grapsa
Dear R users I have a question regarding rpart and survey weights. In the introduction to rpart document it says "Weights are not yet supported, and will be ignored if present", however they are somehow used as the results are different with and without weights. Can weights now be used and if yes,

Re: [R] rpart cutpoint interpretation

2015-10-08 Thread Kishor Tappita
Thank you so much for the clarification Terry. On Thu, Oct 8, 2015 at 6:03 PM, Therneau, Terry M., Ph.D. wrote: > The cutpoint is on the predictor, so the interpretation is the same as it > is for any other rpart model. The subjects with predictor < cutpoint form > one group and those > cutpoin

Re: [R] rpart cutpoint interpretation

2015-10-08 Thread Therneau, Terry M., Ph.D.
The cutpoint is on the predictor, so the interpretation is the same as it is for any other rpart model. The subjects with predictor < cutpoint form one group and those > cutpoint the other. The cutpoint is chosen to give the greatest difference in "average y" between the groups. For poisson "

[R] rpart cutpoint interpretation

2015-10-07 Thread Kishor Tappita
Hi All, I am trying to derive cutpoint/threshold with a poisson distributed dependent variable. I know how to interpret cutpoint with binary dependent variable based on direction. Can some on help me to intrepret cutpoint for poisson case with one independent variable with the derived threshold.

Re: [R] rpart package: How can I save print(rpart)

2014-11-13 Thread Karim Mezhoud
OK thanks That works. :) Ô__ c/ /'_;kmezhoud (*) \(*) ⴽⴰⵔⵉⵎ ⵎⴻⵣⵀⵓⴷ http://bioinformatics.tn/ On Thu, Nov 13, 2014 at 10:41 PM, William Dunlap wrote: > Use paste(collapse="\n", junk) if you want it as a single string with \n's > in it. > > Bill Dunlap > TIBCO Software > wdunlap tibco

Re: [R] rpart package: How can I save print(rpart)

2014-11-13 Thread William Dunlap
Use paste(collapse="\n", junk) if you want it as a single string with \n's in it. Bill Dunlap TIBCO Software wdunlap tibco.com On Thu, Nov 13, 2014 at 1:13 PM, Karim Mezhoud wrote: > Yes Thanks! that works, > but I loose the \n when I would like to save or edit it. > > getTextInWindows is a fun

Re: [R] rpart package: How can I save print(rpart)

2014-11-13 Thread Karim Mezhoud
Yes Thanks! that works, but I loose the \n when I would like to save or edit it. getTextInWindows is a function that edits any text in editor. getTextInWindows(summary): without "\n" save (file= "junk.txt", junk):without "\n" getTextInWindow(capture.output(cat(junk, sep = "\n"))) :No works Thank

Re: [R] rpart package: How can I save print(rpart)

2014-11-13 Thread William Dunlap
Use capture.output(), as in > junk <- capture.output(summary(1:10)) > junk [1] " Min. 1st Qu. MedianMean 3rd Qu.Max. " [2] " 1.003.255.505.507.75 10.00 " > cat(junk, sep="\n") Min. 1st Qu. MedianMean 3rd Qu.Max. 1.003.255.505.5

[R] rpart package: prp does not work with RStudio and R console

2014-11-13 Thread Karim Mezhoud
Hi, All right for rpart package but it seems there is a confusion in "text" function. prp is not found Error in fun() : could not find function "prp" Thanks Ô__ c/ /'_;kmezhoud (*) \(*) ⴽⴰⵔⵉⵎ ⵎⴻⵣⵀⵓⴷ http://bioinformatics.tn/ [[alternative HTML version deleted]] ___

[R] rpart package: How can I save print(rpart)

2014-11-13 Thread Karim Mezhoud
Hi, the print of rpart fitting gives the summary of tree I would like to save the console text of: fit <- rpart(formula, data) summary <- print(fit) when I look in "summary" I did not find the same thing as in "print(rpart)" [1] "Clinical Data exists" [1] "merging samples from Clinical an

Re: [R] rpart and randomforest results

2014-04-08 Thread John Maindonald
un...@r-project.org> [mailto:r-help-boun...@r-project.org] On Behalf Of Schillo, Sonja Sent: Thursday, April 03, 2014 3:58 PM To: Mitchell Maltenfort Cc: r-help@r-project.org<mailto:r-help@r-project.org> Subject: Re: [R] rpart and randomforest results Hi, the random forest should do that,

Re: [R] rpart and randomforest results

2014-04-07 Thread Liaw, Andy
Sent: Thursday, April 03, 2014 3:58 PM To: Mitchell Maltenfort Cc: r-help@r-project.org Subject: Re: [R] rpart and randomforest results Hi, the random forest should do that, you're totally right. As far as I know it does so by randomly selecting the variables considered for a split (but here w

Re: [R] rpart and randomforest results

2014-04-03 Thread Schillo, Sonja
" from the randomforest away. Is that plausible and does anyone have another idea? Thanks Sonja Von: Mitchell Maltenfort [mailto:mmal...@gmail.com] Gesendet: Dienstag, 1. April 2014 13:32 An: Schillo, Sonja Cc: r-help@r-project.org Betreff: Re: [R] rpart and randomforest results Is it possible

Re: [R] rpart and randomforest results

2014-04-01 Thread Mitchell Maltenfort
Is it possible that the random forest is somehow adjusting for optimism or overfitting? On Apr 1, 2014 7:27 AM, "Schillo, Sonja" wrote: > Hi all, > > I have a question on rpart and randomforest results: > > We calculated a single regression tree using rpart and got a pseudo-r2 of > roundabout 10%

[R] rpart and randomforest results

2014-04-01 Thread Schillo, Sonja
Hi all, I have a question on rpart and randomforest results: We calculated a single regression tree using rpart and got a pseudo-r2 of roundabout 10% (which is not too bad compared to a linear regression on this data). Encouraged by this we grew a whole regression forest on the same data set u

[R] rpart - Export rpart object branch splits

2014-02-10 Thread Jared Stabach
I am trying to export the tree splitting results from a rpart object. I can visualize the splits by printing the rpart object (shown below for my rpart object, model.prune). However, this printed result is not a dataframe and I am unable to export this information in .csv format. I can view the

Re: [R] rpart

2013-01-30 Thread Adams, Jean
Carol, Actually, you have only five nodes, numbered 1, 2, 3, 6, and 7. And all five nodes are included in your plot. Nodes 1 and 3 are branching nodes; nodes 2, 6, and 7 are terminal nodes. Try typing just the name of the rpart object for a very brief text version of the tree. rpart.res Jea

[R] rpart

2013-01-27 Thread carol white
Hi, When I look at the summary of an rpart object run on my data, I get 7 nodes but when I plot the rpart object, I get only 3 nodes. Should the number of nodes not match in the results of the 2 functions (summary and plot) or it is not always the same? Look forward to your reply, Carol --

[R] RPART: Including the expense of predictor variables

2013-01-10 Thread Lee Frederick Schroeder
I know that rpart has a complexity parameter that adjusts the number of nodes in a model. I also know that a loss function allows one to weight misclassifications of different types. However, some of my predictor variables are much more expensive dollar-wise to use than others. Is there a way to

Re: [R] R - rpart - increasing xerror

2012-08-19 Thread Uwe Ligges
On 18.08.2012 21:32, Daniel Blankenheim wrote: Hey my name is daniel, i am writing my bachelor thesis and wondering if you can help me. i am trying to generate a regression tree via rpart. to reduce the error of the model i use cross validation, but instead of reducing the cross validation er

[R] R - rpart - increasing xerror

2012-08-18 Thread Daniel Blankenheim
Hey my name is daniel, i am writing my bachelor thesis and wondering if you can help me. i am trying to generate a regression tree via rpart. to reduce the error of the model i use cross validation, but instead of reducing the cross validation error (xerror) is increasing the more splits there ar

Re: [R] rpart package: why does predict.rpart require values for "unused" predictors?

2012-08-02 Thread Jason Roberts
Jean, Thanks for your quick reply and suggestions! > In the help file for predict.rpart it says, "The predictors referred to in > the right side of formula(object) must be present by name in newdata." I was aware of that statement from the help file. I wondered about the reason for that require

Re: [R] rpart package: why does predict.rpart require values for "unused" predictors?

2012-08-02 Thread Jean V Adams
Jason, In the help file for predict.rpart it says, "The predictors referred to in the right side of formula(object) must be present by name in newdata." ?predict.rpart So, that's just the way it is. There are a couple ways to work around this, if you wish. You could create a data frame with a

[R] rpart package: why does predict.rpart require values for "unused" predictors?

2012-08-01 Thread Jason Roberts
After fitting and pruning an rpart model, it is often the case that one or more of the original predictors is not used by any of the splits of the final tree. It seems logical, therefore, that values for these "unused" predictors would not be needed for prediction. But when predict() is called on s

Re: [R] Rpart query

2012-07-27 Thread vickytha...@gmail.com
Replying to quite old thread..but its awesome RWeka package is quite good in dissecting the tree in more than 2 parts. As someone said J48 which is implementation of C4.5 and thus ID3 will be helpful. Also to plot you may have to rage a war like situation. Let us knoe if you face any problem

Re: [R] rpart space in column names

2012-05-28 Thread Prof Brian Ripley
On 28/05/2012 08:27, Jeff Newmiller wrote: It is isn't easy to write code that works with column names that have spaces. You could rewrite rpart, or just rename the columns in your data frame to work around the "bug". See ?names. In any case, rpart pre-dates the `` notation that made this pos

Re: [R] rpart space in column names

2012-05-28 Thread Jeff Newmiller
It is isn't easy to write code that works with column names that have spaces. You could rewrite rpart, or just rename the columns in your data frame to work around the "bug". See ?names. --- Jeff Newmiller

[R] rpart space in column names

2012-05-27 Thread Raji
Hi, Our data has column names with spaces in that.The names in dataFrame are, *[1] "Sepal Length" "Sepal Width" "Petal Length" "Petal Width" "Species" * When i try to use the column names in rpart function, it gives the following error. * rp<-rpart(as.factor(`Species`)~`Sepal Length`) Erro

Re: [R] rpart - predict terminal nodes for new observations

2012-05-18 Thread tudor
Hi Uwe: Thanks a lot for your reply. I contemplated the use of the predict() function but realized that it could not return what I needed (i.e., the terminal nodes and not the classes). I went back to the post of Professor Ripley (http://tolstoy.newcastle.edu.au/R/e4/help/08/07/17702.html) and

Re: [R] rpart - predict terminal nodes for new observations

2012-05-16 Thread Uwe Ligges
On 15.05.2012 16:30, tudor wrote: Dear useRs: Is there a way I could predict the terminal node associated with a new data entry in an rpart environment? In the example below, if I had a new data entry with an AM of 5, I would like to link it to the terminal node 2. My searches led to http://to

[R] rpart - predict terminal nodes for new observations

2012-05-15 Thread tudor
Dear useRs: Is there a way I could predict the terminal node associated with a new data entry in an rpart environment? In the example below, if I had a new data entry with an AM of 5, I would like to link it to the terminal node 2. My searches led to http://tolstoy.newcastle.edu.au/R/e4/help/08/07

Re: [R] rpart error message

2012-04-03 Thread David Winsemius
On Apr 3, 2012, at 4:16 AM, Raji wrote: Hi R-helpers, I am using rpart package for decision tree using R.We are invoking R environment through JRI from our java application.Hence, the result of R command is returned in REXP and we use geterrMessage() to retrieve the error. When we execute t

[R] rpart error message

2012-04-03 Thread Raji
Hi R-helpers, I am using rpart package for decision tree using R.We are invoking R environment through JRI from our java application.Hence, the result of R command is returned in REXP and we use geterrMessage() to retrieve the error. When we execute the following command, cnr_model<-rpart(as.fac

[R] Rpart-Moran test

2012-03-30 Thread MYRIAM TABASSO
Dear All, if I use rpart to built a regression tree and if I study the spatial autocorrelation of the residuals of regression tree, how I use Moran test (or other test) on these residuals? Moran's Test work on lm object, but I have a rpart object. thanks, Myriam [[alternative HTML version

Re: [R] Rpart decision tree

2012-02-15 Thread Achim Zeileis
On Wed, 15 Feb 2012, dlofaro wrote: Dear R-Users, I'm a R beginner and I have a similar problem: I fitted a SurvivalTree with rpart and I'm tryng to plot with the partykit package by the funcion as.party but it sends me this error: plot(as.party(rpartSurv)) Error in plot.constparty(as.party(r

Re: [R] Rpart decision tree

2012-02-15 Thread dlofaro
Dear R-Users, I'm a R beginner and I have a similar problem: I fitted a SurvivalTree with rpart and I'm tryng to plot with the partykit package by the funcion as.party but it sends me this error: > plot(as.party(rpartSurv)) Error in plot.constparty(as.party(rpartSurv)) : node_surv not yet imple

Re: [R] Rpart and splitting criteria

2012-02-11 Thread Uwe Ligges
On 10.02.2012 10:37, MYRIAM TABASSO wrote: Dear All, I have questions about the function "rpart" to construct a regression tree in R code. My problem is how to change the splitting criteria. In the "rpart" we have : parms=list(split="..") , I ask you if in this command is it possible to u

[R] Rpart and splitting criteria

2012-02-10 Thread MYRIAM TABASSO
Dear All, I have questions about the function "rpart" to construct a regression tree in R code. My problem is how to change the splitting criteria. In the "rpart" we have : parms=list(split="..") , I ask you if in this command is it possible to use an another splitting criterion to substitute

Re: [R] rpart: plot without scientific notation

2012-02-03 Thread Adalberto Pineda
Stephen: I tried running your script but couldn't make it work (any feedback is welcome) so I changed it a little bit. I found you still need to set the # of digits as the max # of possible digits of your yval response or greater. node.fun <- function(x) { x$frame$yval<-as.integer(sprintf("%0.f

[R] rpart usersplits

2012-01-30 Thread jcress410
I'm inspecting tests/usersplits.R in rpart, trying to get my head around how to pass data to the split function. I'm trying to instantiate a number of goodness measures which compare treatment vs control within splits. A simple example is difference-in-difference estimate of a candidate split,

Re: [R] rpart question

2012-01-15 Thread Joshua Wiley
Hi Amanda, Sorry for the bit of a slow response (classes and research have been chaotic). Below are details on what I looked at and a few suggestions at the end for what you can do. To the general R community: summary.rpart() makes explicit the default dropping behavior of `[` which makes me thi

[R] rpart vs. tree and deviance calculations

2012-01-10 Thread Josh Browning
Hi Everyone, I'm working on building some classification trees, and up to this point I've been using rpart. However, I recently discovered the tree package, and found that it had some useful functions (in particular deviance(), which I would really like to use for my project). I can't seem to

Re: [R] rpart question

2012-01-08 Thread Joshua Wiley
Hi Amanda, Can you reproduce the error with a small subset of the data? If so, could you send it to us? For instance if say 20 cases is sufficient, you could send the output of dput() which pastes easily into the console: dput(yourdata[, c("ENROLL_YN", "MINORITY")]) You could also try calling

[R] rpart question

2012-01-08 Thread Amanda Marie Elling
We are trying to make a decision tree using rpart and we are continually running into the following error: > fit_rpart=rpart(ENROLL_YN~MINORITY,method="class") > summary(fit_rpart) Call: rpart(formula = ENROLL_YN ~ MINORITY, method = "class") n= 5725 CP nsplit rel error 1 0 0 1

[R] rpart weight parameter and random forest based on rpart

2011-12-20 Thread Wong Hang
Hi all, I am very new to R (only two days of studies). I know a little bit of statistical learning and looking for an implementation of CART and random forest and therefore I am now studying R. I tested with rpart and randomForest package, they are quite good. However, I need a classification

Re: [R] Rpart

2011-10-31 Thread mxkuhn
This mostly happens when the data contain invalid column names (such as all numbers). Try using make.names() on the datasets. Max On Oct 30, 2011, at 11:35 AM, Luisa Sêco wrote: > Dear users, > > I'm using rpart for classification trees, but my code isn't working when I > try to use all the

[R] Rpart

2011-10-30 Thread Luisa Sêco
Dear users, I'm using rpart for classification trees, but my code isn't working when I try to use all the variables in my data frame. This data frame was created from a data frame with 1775 variables, but I choose only 13. arv13<-rpart(iv~.,data=gn,method="class",parms=list(split="information"))

Re: [R] "rpart" or "tree" function issue

2011-09-09 Thread Achim Zeileis
On Thu, 8 Sep 2011, Carlos Ortega wrote: Hi, Use packages "rpart.plot" or "maptree" to enhance the tree drawing. Or another alternative, use "party" package that offers much more graphing possibilities. There is also the "partykit" package on R-Forge which offers party-style graphics for rpa

Re: [R] rpart/tree issue

2011-09-08 Thread Stephen Milborrow
"Brian Jensvold" het geskryf 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 val

Re: [R] "rpart" or "tree" function issue

2011-09-08 Thread Carlos Ortega
Hi, Use packages "rpart.plot" or "maptree" to enhance the tree drawing. Or another alternative, use "party" package that offers much more graphing possibilities. Regards, Carlos Ortega www.qualityexcellence.es On Thu, Sep 8, 2011 at 5:27 PM, Brian Jensvold wrote: > I am trying to create a cla

[R] "rpart" or "tree" function issue

2011-09-08 Thread Brian Jensvold
I am trying to create a classification tree using either tree or rpart functions but when it comes to plotting the results the formatting I get is different than what I see in all the tutorials (like http://www.youtube.com/watch?v=9XNhqO1bu0A or http://www.youtube.com/watch?v=m3mLNpeke0I&feature=re

Re: [R] rpart/tree issue

2011-09-08 Thread Terry Therneau
-- begin included message -- 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.

[R] rpart/tree issue

2011-09-07 Thread Brian Jensvold
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 yo

Re: [R] rpart: apply tree to new data to get "counts"

2011-08-30 Thread Stephen Milborrow
Jay het geskryf When I have made a decision tree with rpart, is it possible to "apply" this tree to a new set of data in order to find out the distribution of observations? Ideally I would like to plot my original tree, with the counts (at each node) of the new data. Sadly, neither plot.rpart

Re: [R] rpart: apply tree to new data to get "counts"

2011-08-29 Thread Jay
I tried that, while I find the documentation a bit short, but the only result I get from this is a probability distribution of my data (I'm building a tree with 2 classes). How do I plot a tree where the counts are show in each step/node? BR, Jay On Aug 29, 9:40 pm, Weidong Gu wrote: > ? predict

[R] Rpart modelling a decisión tree and getting probability

2011-08-29 Thread Jose Bustos Melo
Hello everyone, I working in a public health project and we have created a Decision Tree for categorical variables usign the package rpart. Our goal is to develop a model (Using the ROC tool) in order to predict presence/ausent of  diabetes and get a better understanding  of what are the import

Re: [R] rpart: apply tree to new data to get "counts"

2011-08-29 Thread Weidong Gu
? predict.rpart Weidong Gu On Mon, Aug 29, 2011 at 12:49 PM, Jay wrote: > Hi, > > when I have made a decision tree with rpart, is it possible to "apply" > this tree to a new set of data in order to find out the distribution > of observations? Ideally I would like to plot my original tree, with >

[R] rpart: apply tree to new data to get "counts"

2011-08-29 Thread Jay
Hi, when I have made a decision tree with rpart, is it possible to "apply" this tree to a new set of data in order to find out the distribution of observations? Ideally I would like to plot my original tree, with the counts (at each node) of the new data. Reagards, Jay _

Re: [R] rpart: plot without scientific notation

2011-08-26 Thread Stephen Milborrow
Jay wrote: 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. One way of getting rpart.pl

Re: [R] rpart: plot without scientific notation

2011-08-25 Thread David Winsemius
On Aug 25, 2011, at 10:38 AM, Jean V Adams wrote: I don't see a quick solution to this. You could contact the maintainer of the rpart.plot package, Stephen Milborrow maintainer("rpart.plot") or you could try to modify the rpart.plot() function yourself to meet your needs rpart.pl

Re: [R] rpart: plot without scientific notation

2011-08-25 Thread Jean V Adams
I don't see a quick solution to this. You could contact the maintainer of the rpart.plot package, Stephen Milborrow maintainer("rpart.plot") or you could try to modify the rpart.plot() function yourself to meet your needs rpart.plot Jean Jay wrote on 08/25/2011 05:30:25 AM: > >

[R] rpart: plot without scientific notation

2011-08-25 Thread Jay
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.new

[R] rpart, resolution

2011-07-29 Thread mark
Thank you for all your help. The unexpected solution to my predict() problem was to use the Misc menu and remove all objects before proceeding further. The final digits of the trees continue to be clipped but I can live with that. Mark __ R-help@r-pr

[R] RPART error

2011-05-20 Thread victor pontes
Hi, I have been working generating decision tree analyses on large numbers of simulation datasets using the RPART function.  With some datasets, RPART is returning an error of "Error in yval[, 1] : incorrect number of dimensions".  There seem to be certain types of splits that cause it to break

Re: [R] Rpart decision tree

2011-04-08 Thread tudor
Dear Tal and Achim: Thank you both for your assistance. I followed Achim's suggestions and got what I needed on a Windows machine with R2.12.2 installed. As I needed to run the task on a Windows machine with R2.11.1 I used the package rpart.plot (by Stephen Milborrow) to create my charts. Best

Re: [R] Rpart decision tree

2011-04-08 Thread tudor
Hi Tal: Thanks for your quick reply. I tried to create a classification tree. The problem is that the branches overlap the text in the ellipses (inner nodes) and rectangles (terminal nodes) - At times this makes it difficult for the reader to correctly process the results. One way to overcome

Re: [R] Rpart decision tree

2011-04-08 Thread tudor
Hi Achim: I will give it a try and let you know how it goes. Thanks. Tudor -- View this message in context: http://r.789695.n4.nabble.com/Rpart-decision-tree-tp3435888p3437212.html Sent from the R help mailing list archive at Nabble.com. __ R-help@

Re: [R] Rpart decision tree

2011-04-08 Thread Achim Zeileis
On Fri, 8 Apr 2011, tudor wrote: Dear useRs: I try to plot an rpart object but cannot get a nice tree structure plot. I am using plot.rpart and text.rpart (please see below) but the branches that connect the nodes overlap the text in the ellipses and rectangles. Is there a way to get a clean

Re: [R] Rpart decision tree

2011-04-08 Thread Tal Galili
Hi Tudor, What type of tree did you create? (classification or regression?) Could you give an explanation as to what is not looking nice? Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgal

[R] Rpart decision tree

2011-04-08 Thread tudor
Dear useRs: I try to plot an rpart object but cannot get a nice tree structure plot. I am using plot.rpart and text.rpart (please see below) but the branches that connect the nodes overlap the text in the ellipses and rectangles. Is there a way to get a clean nice tree plot (as in the Rpart Mayo

[R] RPart Simple Diagram issues

2011-04-06 Thread Jackie Gleason
Hey everyone, So I am looking for a way to create a decision tree for a modeling class and I am not all that familiar with R. I thought I might be able to use RPart, but I can't get it to work. I want a simple tree with a parent that says the amount and each child has a percentage of likelyhood an

Re: [R] rpart - how to estimate the “meaningful” predictors for an outcome (in classification t rees)

2010-12-15 Thread Tal Galili
Hello Xiaogang, and thank you for your answer. Your solution was indeed the way I had considered taking (after consulting with some friends in my lab), however, I had hoped to find out if this information (what variable effects which outcome variable) was somehow implicitly contained within the rp

Re: [R] rpart - how to estimate the “meaningful” predictors for an outcome (in classification t rees)

2010-12-14 Thread Xiaogang Su
Hi, Tal, Here is a quick way of getting around. First create two responses via dummy variables y1 <- ifelse(y=="a", 1, 0) y2 <- ifelse(y=="b", 1, 0) and then built two separate tree models for y1 and y2 separately. Hope it helps. Xiaogang On Tue, Dec 14, 2010 at 8:33 AM, Tal Galili wrote: >

[R] rpart - how to estimate the “meaningful” predictors for an outcome (in classification t rees)

2010-12-14 Thread Tal Galili
Hi dear R-help memebers, When building a CART model (specifically classification tree) using rpart, it is sometimes obvious that there are variables (X's) that are meaningful for predicting some of the outcome (y) variables - while other predictors are relevant for other outcome variables (y's onl

Re: [R] rpart results - problem after oversampling

2010-12-02 Thread Jonathan P Daily
s the room still a room when its empty? Does the room, the thing itself have purpose? Or do we, what's the word... imbue it." - Jubal Early, Firefly r-help-boun...@r-project.org wrote on 12/02/2010 05:34:23 AM: > [image removed] > > [R] rpart results - problem after overs

[R] rpart results - problem after oversampling

2010-12-02 Thread Mederos, Vicente (Santander)
Hi all, I am trying to predict a target variable that takes values 0 or 1 using the rpart command. In my initial dataset I have few positive observations of the target variable; therefore I have oversampled the rare event by a multiple of 6 (i.e. from 762 to 4572). However, in my results, I en

Re: [R] Rpart query

2010-10-12 Thread jagdeesh_mn
Here is the complete dataset: Outlook TempHumidityWindy Class Sunny 2 2 Yes Play Sunny 2 1 Yes Don't Play Sunny 3 1 No Don't Play Sunny 2 1 No Don't Play Sunny 1 2 No Play Overcast2

Re: [R] Rpart query

2010-10-12 Thread jagdeesh_mn
@Above, Thanks. That certainly helps. I understand that the rpart splits only in binary. Is there any support in R to make the split have more than 2 nodes? Cheers, Jagdeesh -- View this message in context: http://r.789695.n4.nabble.com/Rpart-query-tp2991198p2991643.html Sent from the R help m

Re: [R] Rpart query

2010-10-12 Thread Achim Zeileis
On Mon, 11 Oct 2010, jagdeesh_mn wrote: Hi, Being a novice this is my first usage of R. I am trying to use rpart for building a decision tree in R. And I have the following dataframe Outlook TempHumidityWindy Class Sunny 75 70 Yes Play Sunny 80 90 Y

Re: [R] Rpart query

2010-10-12 Thread Joel
Or now Im pretty sure of it as when I took your dataset and used the magic way of ctrl-c ctrl-v to make some more observations I get a decision tree. -- View this message in context: http://r.789695.n4.nabble.com/Rpart-query-tp2991198p2991469.html Sent from the R help mailing list archive at Nab

Re: [R] Rpart query

2010-10-12 Thread Joel
My guess is that you have two few observations is your dataset for rpart to determin a "safe" dissision. -- View this message in context: http://r.789695.n4.nabble.com/Rpart-query-tp2991198p2991461.html Sent from the R help mailing list archive at Nabble.com. ___

Re: [R] Rpart query

2010-10-12 Thread Joel
Dont know if it will work but you can try ctree from the party package require(party) bla <- ctree(Class ~ Outlook + Temp + Humidity + Windy, data=dataframe) plot(bla) //Joel -- View this message in context: http://r.789695.n4.nabble.com/Rpart-query-tp2991198p2991417.html Sent from the R help

[R] Rpart query

2010-10-12 Thread jagdeesh_mn
Hi, Being a novice this is my first usage of R. I am trying to use rpart for building a decision tree in R. And I have the following dataframe Outlook TempHumidityWindy Class Sunny 75 70 Yes Play Sunny 80 90 Yes Don't Play Sunny 85 85

[R] rpart - interpretation of results of tree on survival data

2010-08-31 Thread Ritwik Sinha
Hi All, I am fitting a tree to censored survival data using the rpart package and wanted to better understand the results. I am trying to interpret the output from the tree. I am interested in understanding what "yval" is for a survival tree. I see in the output of summary, the phrase "estimated

Re: [R] rpart package

2010-08-12 Thread Boris Reiss
Hi Olga, not directly related to your question. We have also a server installation and subsequently our IT department determines which version and packages I can use on R. A few days ago I have switched to R-portable. Works without any problems from my USB stick on any locked-for-installation W

Re: [R] rpart package

2010-08-12 Thread Erik Iverson
Olga Shaganova wrote: Hi, I am a brand new user and may be my question is too simple. I have R on our (not Unix) server. I am trying to build a decision tree and the error message says "couldn't find function rpart". Does it mean I have to ask our server guy to install an additional package?

[R] rpart package

2010-08-12 Thread Olga Shaganova
Hi, I am a brand new user and may be my question is too simple. I have R on our (not Unix) server. I am trying to build a decision tree and the error message says "couldn't find function rpart". Does it mean I have to ask our server guy to install an additional package? Thank you, Olga [

Re: [R] "rpart": how to use each variable only once?

2010-05-14 Thread Shi, Tao
This is just one single decision tree, not forest. If you're asking what package I use to construct one single tree, it's 'rpart'. > >From: Changbin Du >To: "Shi, Tao" >Cc: r-help@r-project.org >Sent: Fri, May 14, 2010 12:35:20 PM >Subject

Re: [R] "rpart": how to use each variable only once?

2010-05-14 Thread Changbin Du
is this random decision tree, I dont know is there any package can run it. If you know, please let me know. On Fri, May 14, 2010 at 10:23 AM, Shi, Tao wrote: > Hi list, > > Is there a way in "rpart" to force the variables only used once when doing > the splits? > > This is how the question cam

[R] "rpart": how to use each variable only once?

2010-05-14 Thread Shi, Tao
Hi list, Is there a way in "rpart" to force the variables only used once when doing the splits? This is how the question came about. Often time, the tree constructed uses the same variable (say X1) for the first and second splits, for example. However, due to practical reason, the researcher

Re: [R] rpart, cross-validation errors question

2010-05-03 Thread Uwe Ligges
On 03.05.2010 04:26, Claudia Penaloza wrote: 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? Since the

[R] rpart, cross-validation errors question

2010-05-02 Thread Claudia Penaloza
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 rpar

Re: [R] ?rpart

2010-04-21 Thread Changbin Du
Yes, outcome is there. On Wed, Apr 21, 2010 at 3:47 PM, Steve Lianoglou < mailinglist.honey...@gmail.com> wrote: > Hi, > > On Wed, Apr 21, 2010 at 5:20 PM, Changbin Du wrote: > > HI, Dear R community, > > > > Last friday, I used the codes, it works, but today, it does not run? > > > > > >> fit.

Re: [R] ?rpart

2010-04-21 Thread Steve Lianoglou
Hi, On Wed, Apr 21, 2010 at 5:20 PM, Changbin Du wrote: > HI, Dear R community, > > Last friday, I used the codes, it works, but today, it does not run? > > >> fit.dimer <- rpart(outcome ~., method="class", data=p.df) > Error in `[.data.frame`(frame, predictors) : undefined columns selected > > >

Re: [R] ?rpart

2010-04-21 Thread Gabor Grothendieck
The Machine Learning Task view lists alternative packages you could try. On Wed, Apr 21, 2010 at 5:20 PM, Changbin Du wrote: > HI, Dear R community, > > Last friday, I used the codes, it works, but today, it does not run? > > >> fit.dimer <- rpart(outcome ~., method="class", data=p.df) > Error in

  1   2   >