Displaying 20 results from an estimated 10000 matches similar to: "[randomForest]: display decision trees"
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
2007 Apr 29
1
randomForest gives different results for formula call v. x, y methods. Why?
Just out of curiosity, I took the default "iris" example in the RF
helpfile...
but seeing the admonition against using the formula interface for large data
sets, I wanted to play around a bit to see how the various options affected
the output. Found something interesting I couldn't find documentation for...
Just like the example...
> set.seed(12) # to be sure I have
2011 Sep 14
1
substitute games with randomForest::partialPlot
I'm having trouble calling randomForest::partialPlot programmatically.
It tries to use name of the (R) variable as the data column name.
Example:
library(randomForest)
iris.rf <- randomForest(Species ~ ., data=iris, importance=TRUE, proximity=TRUE)
partialPlot(iris.rf, iris, Sepal.Width) # works
partialPlot(iris.rf, iris, "Sepal.Width") # works
(function(var.name)
2007 Jun 06
0
Question on RandomForest in unsupervised mode
Hi,
I attempted to run the randomForest() function on a dataset without
predefined classes. According to the manual, running randomForest
without a response variable/class labels should result in the
function assuming you are running in unsupervised mode. In this case,
I understand that my data is all assigned to one class whereas a
second synthetic class is made up, which is assigned
2011 Dec 22
0
randomforest and AUC using 10 fold CV - Plotting results
Here is a snippet to show what i'm trying to do.
library(randomForest)
library(ROCR)
library(caret)
data(iris)
iris <- iris[(iris$Species != "setosa"),]
fit <- randomForest(factor(Species) ~ ., data=iris, ntree=50)
train.predict <- predict(fit,iris,type="prob")[,2]
2008 Jul 20
1
confusion matrix in randomForest
I have a question on the output generated by randomForest in classification
mode, specifically, the confusion matrix. The confusion matrix lists the
various classes and how the forest classified each one, plus the
classification error. Are these numbers essentially averages over all the
trees in the forest? If so, is there a way I can get the standard deviation
values out of the randomForest,
2013 Oct 15
1
randomForest: Numeric deviation between 32/64 Windows builds
Dear R Developers
I'm using the great randomForest package (4.6-7) for many projects and recently stumbled upon a problem when I wrote unit tests for one of my projects:
On Windows, there are small numeric deviations when using the 32- / 64-bit version of R, which doesn't seem to be a problem on Linux or Mac.
R64 on Windows produces the same results as R64/R32 on Linux or Mac:
>
2010 Apr 25
1
randomForest predictions with new data
Hi
I am new to R, randomForest and I have read about how to use it in your old
mails. I have also run the predictions examples from CRAN. But I still don't
understand how to use it right.
The thing that I don't understand is how to run the result from the
randomForest on one line (post) with newdata to get a good guess. What I
mean is if I put in a new observation of iris how do I
2005 Aug 26
2
problem with certain data sets when using randomForest
Hi,
Since I've had no replies on my previous post about my
problem I am posting it again in the hope someone
notice it. The problem is that the randomForest
function doesn't take datasets which has instances
only containing a subset of all the classes. So the
dataset with instances that either belong to class "a"
or "b" from the levels "a", "b" and
2005 Oct 27
1
Repost: Examples of "classwt", "strata", and "sampsize" i n randomForest?
"classwt" in the current version of the randomForest package doesn't work
too well. (It's what was in version 3.x of the original Fortran code by
Breiman and Cutler, not the one in the new Fortran code.) I'd advise
against using it.
"sampsize" and "strata" can be use in conjunction. If "strata" is not
specified, the class labels will be used.
2004 Dec 10
1
predict.randomForest
I have a data.frame with a series of variables tagged to a binary
response ('present'/'absent'). I am trying to use randomForest to
predict present/absent in a second dataset. After a lot a fiddling
(using two data frames, making sure data types are the same, lots of
testing with data that works such as data(iris)) I've settled on
combining all my data into one data.frame
2006 Oct 08
0
Problem in getting 632plus error using randomForest by ipred!
Hello!
I'm Taeho, a graduate student in South Korea.
In order to get .632+ bootstrap error using random forest, I have tried to use 'ipred' package; more specifically the function 'errorest' has been used.
Following the guidelines, I made a simple command line like below:
error<-errorest(class ~ ., data=data, model=randomForest, estimator = "632plus")$err
2002 Apr 05
1
randomForest() segfaults under Solaris(SPARC) 2.7
Invocation of randomForest() using the iris example in the help
file crashes R with a segmentation fault. This happens on
all of our ultraSPARC machines running Solaris 2.7.
We're using R-1.4.1, compiled using Sun cc and f77 and
the flags:
CC=cc
CFLAGS="-xO5 -xlibmil -dalign"
FC=f77
FFLAGS="-xO5 -xlibmil -dalign"
"make check" runs withour errors, and R has been
2010 May 04
1
randomforests - how to classify
Hi,
I'm experimenting with random forests and want to perform a binary
classification task.
I've tried some of the sample codes in the help files and things run, but I
get a message to the effect 'you don't have very many unique values in the
target - are you sure you want to do regression?' (sorry, don't know exact
message but r is busy now so can't check).
In
2005 Jan 06
1
different result from the same errorest() in library( ipred)
Dear all,
Does anybody can explain this: different results got when all the same parameters are used in the errorest() in library ipred, as the following?
errorest(Species ~ ., data=iris, model=randomForest, estimator = "cv", est.para=control.errorest(k=3), mtry=2)$err
[1] 0.03333333
> errorest(Species ~ ., data=iris, model=randomForest, estimator = "cv",
2018 Jan 07
4
partialPlot en un Randomforest
Muchas gracias Carlos; ¡tu siempre al pié del cañón! (lo puse el día
de reyes a la 1.20h y me contestas a las 2.45h)
Una cosa más: si el eje y es la probabilidad ¿por qué va de 0 a 10? En
un RF para clasificación me da valores parecidos a los de tu ejemplo,
y en otro para regresión, valores de y entre 45 y 55.
Para regresión, el último parámetro no puede ser una categoría, como
2004 Jan 12
0
new version of randomForest (4.0-7)
Dear R users,
I've just released a new version of randomForest (available on CRAN now).
This version contained quite a number of new features and bug fixes,
compared to version prior to 4.0-x (and few more since 4.0-1).
For those not familiar with randomForest, it's an ensemble
classifier/regression tool. Please see
http://www.math.usu.edu/~adele/forests/ for more detailed information,
2004 Jan 12
0
new version of randomForest (4.0-7)
Dear R users,
I've just released a new version of randomForest (available on CRAN now).
This version contained quite a number of new features and bug fixes,
compared to version prior to 4.0-x (and few more since 4.0-1).
For those not familiar with randomForest, it's an ensemble
classifier/regression tool. Please see
http://www.math.usu.edu/~adele/forests/ for more detailed information,
2005 Aug 14
1
How to add decision trees into a list?
Hi,
I am somewhat new to R so this question may be
foolish, but is it possible to add decision trees into
a list, array or vector in R?
I am trying to build a collection (ensemble) of
decision trees. Every time a new instance arrive I
need to get the prediction of each decision tree. I
have tried to add a decision tree into a variable but
without luck. Is a special package needed perhaps?
This
2007 Apr 24
1
NA and NaN randomForest
Dear R-help,
This is about randomForest's handling of NA and NaNs in test set data.
Currently, if the test set data contains an NA or NaN then
predict.randomForest will skip that row in the output.
I would like to change that behavior to outputting an NA.
Can this be done with flags to randomForest?
If not can some sort of wrapper be built to put the NAs back in?
thanks,
Clayton