Re: [R] Decision Tree and Random Forrest

2016-04-13 Thread Michael Eugene
I still need the output to match my requiremnt in my original post. With 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 smartphone Original messa

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] reduced set of alternatives in package mlogit

2016-04-13 Thread John Kane
To back up Ber's please have a look at http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example and/or http://adv-r.had.co.nz/Reproducibility.html John Kane Kingston ON Canada > -Original Message- > From: jose.ferr...@logiteng.com > Sent: Wed, 13 Apr 2016 17

[R] Decision Tree and Random Forrest

2016-04-13 Thread Michael Artz
Hi I'm trying to get the top decision rules from a decision tree. Eventually I will like to do this with R and Random Forrest. There has to be a way to output the decsion rules of each leaf node in an easily readable way. I am looking at the randomforrest and rpart packages and I dont see anything

[R] on the output of constrOptim()

2016-04-13 Thread Christophe Dutang
Dear list, The following example of constrOptim() where the initial point is the solution shows that the component counts is not a two-element vector as documented in the man page. constrOptim(c(1,1), fr, grr, ui = diag(2), ci = c(0,0)) Does anyone have the same behavior? A possible solution

Re: [R] reduced set of alternatives in package mlogit

2016-04-13 Thread Jose Marcos Ferraro
code? example data? We can only guess based on your vague post. "PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code." Moreover, this sounds like a statistical question, not a question about R programmi

Re: [R] formula argument evaluation

2016-04-13 Thread William Dunlap via R-help
%=>% would have precendence ('order of operations') problems also. A + B %=>% C is equivalent to A + ( B %=>% C) and I don't think that is what you want. as.list(quote(A + B %=>% C)) shows the first branch in the parse tree. The following function, str.language, shows the entire parse tr

Re: [R] R 3.2.4-revised is released

2016-04-13 Thread Peter Dalgaard
CRAN turned out to have structural issues with version numbers that are not of the x.y.z variety (some script break). I'm trying to find time to build a 3.2.5 just to fix this up. Of course all standard procedures are broken as 3.3.0 is now in progress, so several things now need to be done manu

Re: [R] No color in plotting

2016-04-13 Thread PIKAL Petr
Hi Without some reproducible example you hardly get any answer. if this works library(ggplot2) p <- ggplot(mtcars, aes(wt, mpg)) p + geom_point() the problem is in your data. If it does not, the problem is elsewhere, including broken R installation. Cheers Petr > -Original Message- >

Re: [R] R 3.2.4-revised is released

2016-04-13 Thread Patrick Connolly
My CRAN mirror still says this: The latest release (Thursday 2016-03-10, Very Secure Dishes) R-3.2.4.tar.gz, read what's new in the latest version. Should that not be updated? Anyone who has not seen that post won't know to look further. On Wed, 16-Mar-2016 at 08:39PM +, Peter Dalgaard

Re: [R] formula argument evaluation

2016-04-13 Thread Adrian Dușa
I suppose it would work, although "=>" is rather a descriptive symbol and less a function. But choosing between quoting: "A + B => C" and a regular function: A + B %=>% C probably quoting is the most straightforward, as the result of the foo() function has to be a string anyways (which is parsed by