Displaying 18 results from an estimated 18 matches for "gettree".
2009 Dec 04
1
RandomForest - getTree status code
What does a status value of -3 mean when I do a regression with RF and use the getTree function?
left daughter right daughter split var split point status prediction
1 2 3 11 4.721000e+03 -3 15.8489576
2 4 5 5 6.500000e+00 -3 11.3240895
3 6 7 10 6.790674e+02 -3...
2013 Feb 11
0
getTree visualization (randomForest)
Hi,
I would like to visualize a tree extracted from a random forest using
getTree {randomForest}.
I'm wondering if there is any way to do it directly or to convert my tree
to any other class of tree repesentation, which then can be plotted?
Regards,
Umang Rathi
________________________________
This email message may contain proprietary, private and confidential informatio...
2010 May 17
1
Help with RandomForest
...ssfully build a
model. I'd like to go one step further however, and use the output from
the model to construct a map using the output. My input data are spatial,
and I have an independent set of rasterize maps for each of the predictor
variables, to map the classification solution.
Using the getTree function:
> getTree(randomForest(veg.physical[,-1], veg.physical[,1], ntree = 20, ),
labelVar = TRUE)
returns a "list" with dim(tree) 451 rows x 6 columns.
I assume that other folks using this package and publishing maps have used
this list to link the left and right daughters, sp...
2008 Jun 17
1
Decision Trees RWeka
Hello,
I have a question concerning decision
trees coming from RWeka :
library(RWeka)
m =J48(Species~.,data=iris)
How could such a decision tree be transferred
into a matrix, pretty much in the same fashion,
as it is done by getTree() in library(ofw)
library(ofw)
data(srbct)
attach(srbct)
##ofwCART
learn.cart.keep <- ofw(srbct, as.factor(class),type="CART", ntree=50, nforest=10, mtry=5)
getTree(learn.cart.keep, k=3)
detach(srbct)
It would be very convenient to have
a Weka Decision Tree object...
2005 Mar 23
1
Gini's Importance Value Variable = Inf
Hi All,
In the script below, the importance measure for column 4 (ie
MeanDecreaseGini) indicated "Inf" for V7.
Running the getTree command showed that "V7" had been selected at least
twice in one of the trees for Random Forest. So the "Inf" command was
not generated as a result of dividing the sum of the decreases by 0.
Any suggestions on what may be causing the Inf in "V7" would be helpful?
Th...
2000 Sep 07
1
Calloc() & Free() in different .C(.) calls --> not usable ?
...olution [simplified!]:
## First I fit the tree to my Data, all in C, but only return the *size*
## I'll need to store that tree in R
size <- .C("fittree", data, ..., res = integer(1))$res
## Now that I know its size, I can get it into R :
tree.in.R <- .C("gettree", size, res = integer(size))$res
where in the C code, I have a
global
static *tree_struct my_tree;
and in C's fittree(), I use
my_tree = Calloc(1, tree_struct);
for building the tree, which is
then accessed by gettree(), which ends in
Free(my_tree);
All well, BUT:
proble...
2009 Apr 08
2
help with random forest package
Hello,
I am a phd student in Bioinformatics and I am using the Random Forest
package in order to classify my data, but I have some questions.
Is there a function in order to visualize the trees, so as to get the rules?
Also, could you please provide me with the code of "randomForest" function,
as I would like to see how it works. I was wondering if I can get the
classification having
2007 May 08
0
How might I -remove- a tree from a random forest?
I see the function "getTree", which is very interesting. As I'm trying to
teach myself more and more about R, and dealing with lists, it occurred to
me that it might be fun to remove (as in delete) a single tree from a
forest...say to go from 500 to 499.
I know, I know... "why?"
Why, to play, of course!...
2008 Mar 11
1
randomForest get tree
All,
What purpose does the getTree function have in Random Forest? Can you graph it
as you can in rpart and can it be interpreted in the same way?
Helen Mills Poulos
Yale School of Forestry
2009 Sep 28
1
how to visualize gini coefficient in each node in RF?
Dear all,
I am working with randomForest package and I am interested in examining the
"Gini importance" measures that are used as a general indicator of feature
relevance. Is there a possibility of getting the Gini measure that is being
estimated in each tree by the output of the getTree() function?
Thanks a lot,
Chrysanthi
[[alternative HTML version deleted]]
2009 Sep 09
1
oVirt Appliance / Single Machine Install
The following two patches fixes / reimplements the oVirt appliance
project, installing the entire oVirt stack including all server
and node components on one machine.
These patches are intended to be checked out and used to build
the appliance rpm, after which it is installed provides the
/usr/sbin/ovirt-appliance-ctrl script to install/uninstall the
appliance.
The first patch merely removes
2008 Feb 04
0
SOLVED: use classificators learned in R in "real-life", e.g. C
...resentations of rpart or
randomForest, I came to a much simpler and straight-forward solution:
with only a couple of lines, the corresponding c-code for a tree can be
emitted. e.g. for randomForest:
## generate C code from rforests. generate code for tree k
gen_code=function(rfobj,k) {
tree=getTree(rfobj,k,labelVar=TRUE);
count=0;
loc.env=environment();
visit=function(idx) {
assign('count',count+1,env=loc.env);
if (tree[idx,'status']==-1)
cat(sprintf("RETURN(%s)\n",tree[idx,'prediction']))
else {
cat(sprintf("if (GET...
2008 Oct 09
1
Dump decision trees of randomForest object
Hi,
I'm using the package randomForest to generate a classifier for the exemplary
iris data set:
data(iris)
iris.rf<-randomForest(Species~.,iris)
Is it possible to print all decision trees in the generated forest?
If so, can the trees be also written to disk?
What I actually need is to translate the decision trees in a random forest
into equivalent C++ if-then-else constructs to
2010 Mar 16
0
Ensembles in cforest
Dear List,
I'm trying to find a way to extract the individual conditional inference
trees from cforest ( a modelling function in the party package) in a
manner analogous to
getTree in randomForest and I'm struggling. I can see that the
information is held within the ensemble list, but haven't been able to
work out how this sequence
of nested lists is structured or if any of the items are named. Any help
would be appreciated.
I'm running R2.10.0 on windows XP.
Ki...
2004 Jul 26
5
installing problems repeated.tgz linux
Hi,
i try several possibilities adn looking in the archive,
but didn't getting success to install j.lindsey's usefuel "library
repeated" on my linux (suse9.0 with kernel 2.6.7,R.1.9.1)
P.S. Windows, works fine
Many thanks for help
Christian
chris at linux:/space/downs> R CMD INSTALL - l /usr/lib/R/library repeated
WARNING: invalid package '-'
WARNING:
2004 Jan 12
0
new version of randomForest (4.0-7)
...there are 950 class 1s and 50 class 2s, use
sampsize=c(50, 50) will usually give a more `balanced' classifier.
o There is a new importance() function for extracting the importance
measure.
o The predict() method has an option to return predictions by the component
trees.
o There is a new getTree() function for looking at one of the trees in the
forest.
o For dealing with missing values in the predictor variables, there are
na.roughfix() and rfImpute(), which correspond to the `missquick' and
`missright' options in Breiman's V4/V5 code. Both works for classification
as well...
2004 Jan 12
0
new version of randomForest (4.0-7)
...there are 950 class 1s and 50 class 2s, use
sampsize=c(50, 50) will usually give a more `balanced' classifier.
o There is a new importance() function for extracting the importance
measure.
o The predict() method has an option to return predictions by the component
trees.
o There is a new getTree() function for looking at one of the trees in the
forest.
o For dealing with missing values in the predictor variables, there are
na.roughfix() and rfImpute(), which correspond to the `missquick' and
`missright' options in Breiman's V4/V5 code. Both works for classification
as well...
2005 Sep 08
2
Re-evaluating the tree in the random forest
Dear mailinglist members,
I was wondering if there was a way to re-evaluate the
instances of a tree (in the forest) again after I have
manually changed a splitpoint (or split variable) of a
decision node. Here's an illustration:
library("randomForest")
forest.rf <- randomForest(formula = Species ~ ., data
= iris, do.trace = TRUE, ntree = 3, mtry = 2,
norm.votes = FALSE)
# I am