Re: [R] Decision Tree and Random Forrest

2016-04-15 Thread Michael Artz
h >> >> decision rules "clusters" and probability attached to them. The >> examples >> >> are sort of similar. You just provided links to general info about >> trees. >> >> >> >> >> >> >> >> Sent from my Verizon, Samsung Galaxy smartpho

Re: [R] Decision Tree and Random Forrest

2016-04-15 Thread William Dunlap via R-help
neral info about > trees. > >> > >> > >> > >> Sent from my Verizon, Samsung Galaxy smartphone > >> > >> > >> Original message > >> From: Sarah Goslee > >> Date: 4/13/16 8:04 PM (GMT-06:00) > >> To: Micha

Re: [R] Decision Tree and Random Forrest

2016-04-15 Thread Michael Artz
ed to them. The examples >> are sort of similar. You just provided links to general info about trees. >> >> >> >> Sent from my Verizon, Samsung Galaxy smartphone >> >> >> Original message >> From: Sarah Goslee >> Date: 4/13/

Re: [R] Decision Tree and Random Forrest

2016-04-14 Thread Sarah Goslee
> > > Original message > From: Sarah Goslee > > Date: 4/13/16 8:04 PM (GMT-06:00) > To: Michael Artz > > Cc: "r-help@r-project.org > " < > R-help@r-project.org > > > Subject: Re: [R] Decision Tree and Random Forrest > > &g

Re: [R] Decision Tree and Random Forrest

2016-04-14 Thread Achim Zeileis
On Thu, 14 Apr 2016, Michael Artz wrote: Ah yes I will have to use the predict function. But the predict function will not get me there really. If I can take the example that I have a model predicting whether or not I will play golf (this is the dependent value), and there are three independen

Re: [R] Decision Tree and Random Forrest

2016-04-13 Thread Michael Eugene
- Original message From: Sarah Goslee Date: 4/13/16 8:04 PM (GMT-06:00) To: Michael Artz Cc: "r-help@r-project.org" Subject: Re: [R] Decision Tree and Random Forrest On Wednesday, April 13, 2016, Michael Artz wrote: > Tjats great that you are familiar and thanks fo

Re: [R] Decision Tree and Random Forrest

2016-04-13 Thread Sarah Goslee
On Wednesday, April 13, 2016, Michael Artz wrote: > Tjats great that you are familiar and thanks for responding. Have you > ever done what I am referring to? I have alteady spent time going through > links and tutorials about decision trees and random forrests and have even > used them both befo

Re: [R] Decision Tree and Random Forrest

2016-04-13 Thread Michael Artz
Tjats great that you are familiar and thanks for responding. Have you ever done what I am referring to? I have alteady spent time going through links and tutorials about decision trees and random forrests and have even used them both before. Mike On Apr 13, 2016 5:32 PM, "Sarah Goslee" wrote: I

Re: [R] Decision Tree and Random Forrest

2016-04-13 Thread Sarah Goslee
It sounds like you want classification or regression trees. rpart does exactly what you describe. Here's an overview: http://www.statmethods.net/advstats/cart.html But there are a lot of other ways to do the same thing in R, for instance: http://www.r-bloggers.com/a-brief-tour-of-the-trees-and-fo

Re: [R] Decision Tree and Random Forrest

2016-04-13 Thread Michael Artz
Ah yes I will have to use the predict function. But the predict function will not get me there really. If I can take the example that I have a model predicting whether or not I will play golf (this is the dependent value), and there are three independent variables Humidity(High, Medium, Low), Pen

Re: [R] Decision Tree and Random Forrest

2016-04-13 Thread Bert Gunter
I think you are missing the point of random forests. But if you just want to predict using the forest, there is a predict() method that you can use. Other than that, I certainly don't understand what you mean. Maybe someone else might. Cheers, Bert Bert Gunter "The trouble with having an open m

Re: [R] Decision Tree and Random Forrest

2016-04-13 Thread Michael Artz
Also that being said, just because random forest are not the same thing as decision trees does not mean that you can't get decision rules from random forest. On Wed, Apr 13, 2016 at 4:11 PM, Michael Artz wrote: > Ok is there a way to do it with decision tree? I just need to make the > decision

Re: [R] Decision Tree and Random Forrest

2016-04-13 Thread Michael Artz
Ok is there a way to do it with decision tree? I just need to make the decision rules. Perhaps I can pick one of the trees used with Random Forrest. I am somewhat familiar already with Random Forrest with respective to bagging and feature sampling and getting the mode from the leaf nodes and it

Re: [R] Decision Tree and Random Forrest

2016-04-13 Thread Bert Gunter
Nope. Random forests are not decision trees -- they are ensembles (forests) of trees. You need to go back and read up on them so you understand how they work. The Hastie/Tibshirani/Friedman "The Elements of Statistical Learning" has a nice explanation, but I'm sure there are lots of good web resou

Re: [R] Decision tree in R using csv files

2015-06-04 Thread John Kane
No attachment. See http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example and http://adv-r.had.co.nz/Reproducibility.html John Kane Kingston ON Canada > -Original Message- > From: aks...@cosmicad.com > Sent: Thu, 4 Jun 2015 08:55:42 -0700 (PDT) > To: r-he

Re: [R] Decision Tree

2014-07-13 Thread Graham Williams
It is box.col= in prp(). fancyRpartPlot() in Rattle currently uses a fixed colour palette (something I should change). You could change it in a local copy of the fancyRpartPlot() code (see the line defining pals in the function): > fancyRpartPlot I also give an example around page 33 of the Dec

Re: [R] Decision Tree

2014-07-10 Thread Abhinaba Roy
Hi Jean, I'd looked at the help for 'prp' but couldn't find the argument for changing box colours. Am I missing something? On Thu, Jul 10, 2014 at 8:01 PM, Adams, Jean wrote: > The function fancyRpartPlot() is actually in the rattle package, and it is > a wrapper for the prp() function in the

Re: [R] Decision Tree

2014-07-10 Thread Adams, Jean
The function fancyRpartPlot() is actually in the rattle package, and it is a wrapper for the prp() function in the rpart.plot package. If you look at the help for prp(), you should be able to see how to change the color. library(rpart.plot) ?prp Jean On Thu, Jul 10, 2014 at 12:34 AM, Abhinaba

Re: [R] Decision Tree: Am I Missing Anything?

2012-09-22 Thread Max Kuhn
Vik, On Fri, Sep 21, 2012 at 12:42 PM, Vik Rubenfeld wrote: > Max, I installed C50. I have a question about the syntax. Per the C50 manual: > > ## Default S3 method: > C5.0(x, y, trials = 1, rules= FALSE, > weights = NULL, > control = C5.0Control(), > costs = NULL, ...) > > ## S3 method for class

Re: [R] Decision Tree: Am I Missing Anything?

2012-09-22 Thread Bhupendrasinh Thakre
My pleasure. As a part of R team we are always here to help each other. Best Regards, Bhupendrasinh Thakre Sent from my iPhone On Sep 22, 2012, at 1:46 PM, Vik Rubenfeld wrote: > Bhupendrashinh, thanks again for telling me about RWeka. That made a big > difference in a job I was working on

Re: [R] Decision Tree: Am I Missing Anything?

2012-09-22 Thread Vik Rubenfeld
Bhupendrashinh, thanks again for telling me about RWeka. That made a big difference in a job I was working on this week. Have a great weekend. -Vik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] Decision Tree: Am I Missing Anything?

2012-09-21 Thread Vik Rubenfeld
Max, I installed C50. I have a question about the syntax. Per the C50 manual: ## Default S3 method: C5.0(x, y, trials = 1, rules= FALSE, weights = NULL, control = C5.0Control(), costs = NULL, ...) ## S3 method for class ’formula’ C5.0(formula, data, weights, subset, na.action = na.pass, ...) I b

Re: [R] Decision Tree: Am I Missing Anything?

2012-09-21 Thread mxkuhn
There is also C5.0 in the C50 package. It tends to have smaller trees that C4.5 and much smaller trees than J48 when there are factor predictors. Also, it has an optional feature selection ("winnow") step that can be used. Max On Sep 21, 2012, at 2:18 AM, Achim Zeileis wrote: > Hi, > > just

Re: [R] Decision Tree: Am I Missing Anything?

2012-09-20 Thread Achim Zeileis
Hi, just to add a few points to the discussion: - rpart() is able to deal with responses with more than two classes. Setting method="class" explicitly is not necessary if the response is a factor (as in this case). - If your tree on this data is so huge that it can't even be plotted, I woul

Re: [R] Decision Tree: Am I Missing Anything?

2012-09-20 Thread Vik Rubenfeld
Very good. Could you point me in a couple of potential directions for variable reduction? E.g. correlation analysis? On Sep 20, 2012, at 10:36 PM, Bhupendrasinh Thakre wrote: > One possible way to think of it is using " variable reduction" before going > for J48. You may want to use several m

Re: [R] Decision Tree: Am I Missing Anything?

2012-09-20 Thread Bhupendrasinh Thakre
One possible way to think of it is using " variable reduction" before going for J48. You may want to use several methods available for that. Again prediction for brands is more of a business question to me. Two solution which I can think of. 1. Variable reduction before decision tree. 2. Let th

Re: [R] Decision Tree: Am I Missing Anything?

2012-09-20 Thread Vik Rubenfeld
Bhupendrashinh, thanks very much! I ran J48 on a respondent-level data set and got a 61.75% correct classification rate! Correctly Classified Instances 988 61.75 % Incorrectly Classified Instances 612 38.25 % Kappa statistic

Re: [R] Decision Tree: Am I Missing Anything?

2012-09-20 Thread Vik Rubenfeld
Thanks! Here's the dput output: > dput(test.df) structure(list(BRND = structure(c(1L, 12L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 13L, 14L, 15L), .Label = c("Brand 1", "Brand 10", "Brand 11", "Brand 12", "Brand 13", "Brand 14", "Brand 15", "Brand 16", "Bran

Re: [R] Decision Tree: Am I Missing Anything?

2012-09-20 Thread Bhupendrasinh Thakre
Not very sure what the problem is as I was not able to take your data for run. You might want to use dput() command to present the data. Now on the programming side. As we can see that we have more than 2 levels for the brands and hence method = class is not able to able to understand what you

Re: [R] Decision tree model using rpart ( classification

2011-11-04 Thread Andrew Ziem
aajit75 yahoo.co.in> writes: > fit <- rpart(decile ~., method="class", > control=rpart.control(minsplit=min_obs_split, cp=c_c_factor), > data=dtm_ip) > > In A and B target variable 'segment' is from the clustering data using same > set of input variables , while in C target va

Re: [R] Decision tree model using rpart ( classification

2011-11-04 Thread Tal Galili
Could you please repeat the error massage you get for C ? Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (Engli

Re: [R] Decision tree model using rpart ( classification

2011-11-04 Thread aajit75
Hi, Thanks for the responce, code for each case is as: c_c_factor <- 0.001 min_obs_split <- 80 A) fit <- rpart(segment ~., method="class", control=rpart.control(minsplit=min_obs_split, cp=c_c_factor), data=Beh_cluster_out) B) fit <- rpart(segment ~., method="class",

Re: [R] Decision tree model using rpart ( classification

2011-11-04 Thread Tal Galili
Hi Ajit, Please send the code you are running in each case. Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (Engl

Re: [R] decision tree display

2010-09-15 Thread Uwe Ligges
If you are talking about an rpart object you are going to plot, see ?plot.rpart and ?text.rpart Uwe Ligges On 19.08.2010 23:10, Olga Shaganova wrote: I am using "plot" and "text" commands to display the decision tree I built, here is the code: plot(fit, compress=TRUE) text(fit, use.n=T

Re: [R] Decision Tree in Python or C++?

2010-09-08 Thread Liaw, Andy
c: r-help@r-project.org > Subject: Re: [R] Decision Tree in Python or C++? > > for python, please check > http://onlamp.com/pub/a/python/2006/02/09/ai_decision_trees.html > > On Sat, Sep 4, 2010 at 11:21 AM, noclue_ wrote: > > > > > > Have anybody used Decisi

Re: [R] Decision Tree in Python or C++?

2010-09-04 Thread Wensui Liu
for python, please check http://onlamp.com/pub/a/python/2006/02/09/ai_decision_trees.html On Sat, Sep 4, 2010 at 11:21 AM, noclue_ wrote: > > > Have anybody used Decision Tree in Python or C++?  (or written their own > decision tree implementation in Python or C++)?  My goal is to run decision >

Re: [R] decision tree finetune

2010-08-13 Thread Olga Shaganova
I figured it out myself, here it is: control=rpart.control(cp=.001)) Thank you! On Fri, Aug 13, 2010 at 12:58 PM, Olga Shaganova wrote: > My decision tree grows only with one split and based on what I see in > E-Miner it should split on more variables. How can I adjust splitting > criteria in R

Re: [R] decision tree with weighted inputs

2010-07-26 Thread Carlos Ortega
Hi, In the R-Help history there have been similar questions to yours. As a starting point you can check this: http://tolstoy.newcastle.edu.au/R/e2/help/07/01/9138.html Regrads, Carlos. On Thu, Jul 22, 2010 at 6:37 PM, David Shin wrote: > I'd like to train a decision tree on a set of weighted