Displaying 20 results from an estimated 8000 matches similar to: "RandomForest how to identify two classes when only one is present"
2009 Oct 27
1
Using a variable in the formula
I am sure this question has come up, but searching hasn't given me any
results.
So I need to enter this line:
mx1 <- randomForest(X1 ~ elevation + slope + vegtype, data = moths.train)
But the problem is that X1 is currently hard coded. I would instead like to
be able to put in the value of X1 through a list. For example:
list <- list("X1", "X2", "X3")
2023 May 09
1
RandomForest tuning the parameters
Hi Sacha,
On second thought, perhaps this is more the direction that you want ...
X2 = cbind(X_train,y_train)
colnames(X2)[3] = "y"
regr2<-randomForest(y~x1+x2, data=X2,maxnodes=10, ntree=10)
regr
regr2
#Make prediction
predictions= predict(regr, X_test)
predictions2= predict(regr2, X_test)
HTH,
Eric
On Tue, May 9, 2023 at 6:40?AM Eric Berger <ericjberger at gmail.com>
2011 May 12
2
Can ROC be used as a metric for optimal model selection for randomForest?
Dear all,
I am using the "caret" Package for predictors selection with a randomForest model. The following is the train function:
rfFit<- train(x=trainRatios, y=trainClass, method="rf", importance = TRUE, do.trace = 100, keep.inbag = TRUE,
tuneGrid = grid, trControl=bootControl, scale = TRUE, metric = "ROC")
I wanted to use ROC as the metric for variable
2006 Jul 24
2
RandomForest vs. bayes & svm classification performance
Hi
This is a question regarding classification performance using different methods.
So far I've tried NaiveBayes (klaR package), svm (e1071) package and
randomForest (randomForest). What has puzzled me is that randomForest seems to
perform far better (32% classification error) than svm and NaiveBayes, which
have similar classification errors (45%, 48% respectively). A similar
difference in
2012 Mar 08
2
Regarding randomForest regression
Sir,
This query is related to randomForest regression using R.
I have a dataset called qsar.arff which I use as my training set and
then I run the following function -
rf=randomForest(x=train,y=trainy,xtest=train,ytest=trainy,ntree=500)
where train is a matrix of predictors without the column to be
predicted(the target column), trainy is the target column.I feed the same
data
2009 Dec 10
2
different randomForest performance for same data
Hello,
I came across a problem when building a randomForest model. Maybe someone can help me.
I have a training- and a testdataset with a discrete response and ten predictors (numeric and factor variables). The two datasets are similar in terms of number of predictor, name of variables and datatype of variables (factor, numeric) except that only one predictor has got 20 levels in the training
2012 Mar 23
1
Memory limits for MDSplot in randomForest package
Hello,
I am struggling to produce an MDS plot using the randomForest package
with a moderately large data set. My data set has one categorical
response variables, 7 predictor variables and just under 19000
observations. That means my proximity matrix is approximately 133000
by 133000 which is quite large. To train a random forest on this large
a dataset I have to use my institutions high
2008 Jun 15
1
randomForest, 'No forest component...' error while calling Predict()
Dear R-users,
While making a prediction using the randomForest function (package
randomForest) I'm getting the following error message:
"Error in predict.randomForest(model, newdata = CV) : No forest component
in the object"
Here's my complete code. For reproducing this task, please find my 2 data
sets attached ( http://www.nabble.com/file/p17855119/data.rar data.rar ).
2023 Mar 19
1
ver el código de randomForest
Buenos días:
Otra opción es escribir directamente el nombre de la función en la
consola de R:
> randomForest
function (x, ...)
UseMethod("randomForest")
En este caso, la función randomForest() llama a UseMethod() para
seleccionar el método adecuado.
Podemos ver los métodos para randomForest con la función methods():
> methods(randomForest)
[1] randomForest.default*
2006 Apr 18
2
installation of package "randomForest" failed
Hello
I'd like to try out some functions in the package randomForest. Therefore,
I did install this package. However, it is not possible to load the
library, although I have R-Version 2.1.1 (i.e. later than 2.0.0). The
commands I used and the Answers/Error from R is as follows:
>
install.packages("C://Programme//R//rw2011//library//randomForest_4.5-16.zip",
2010 May 10
2
Installing randomForest on Ubuntu Errors
Hello,
I've tried to install randomForest on a Ubuntu 8.04 Hardy Heron system.
I've repeatedly rec'd the error:
> install.packages("randomForest", dependencies = TRUE)
ERROR: compiliation failed for package 'randomForest'
** Removing '/home/admuser/R/i486-pc-linux-gnu-library/2.6/randomForest'
The downloaded packages are in
2006 Jan 27
1
save trained randomForest model
I used the following command to train a randomForest model
train.rf <- randomForest(grp ~ ., data=tr, ntree=100, mtry=50)
My question is how to save the trained model so that it can be loaded later for testing new samples?
Thanks,
Luk
---------------------------------
[[alternative HTML version deleted]]
2008 Jul 22
2
randomForest Tutorial
I am new to R and I'd like to use the randomForest package for my thesis
(identifying important variables for more detailed analysis with other
software). I have found extremely well written and helpful information on
the usage of R.
Unfortunately it seems to be very difficult to find similarly detailed
tutorials for randomForest, and I just can't get it work with the
information on
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 07
1
randomForest memory footprint
Hello, I am attempting to train a random forest model using the
randomForest package on 500,000 rows and 8 columns (7 predictors, 1
response). The data set is the first block of data from the UCI
Machine Learning Repo dataset "Record Linkage Comparison Patterns"
with the slight modification that I dropped two columns with lots of
NA's and I used knn imputation to fill in other gaps.
2011 Jan 20
1
randomForest: too many elements specified?
I getting "Error in matrix(0, n, n) : too many elements specified"
while building randomForest model, which looks like memory allocation
error.
Software versions are: randomForest 4.5-25, R version 2.7.1
Dataset is big (~90K rows, ~200 columns), but this is on a big machine (
~120G RAM)
and I call randomForest like this: randomForest(x,y)
i.e. in supervised mode and not requesting
2011 Jan 03
1
randomForest speed improvements
Hi there,
We're trying to use randomForest to do some predictions. The test-harness
for our code is pretty straightforward:
library ('randomForest');
data202 <- read.csv ("random.csv", header=TRUE);
x<- data202[1:50000,1:6];
y<- data202[1:50000,8];
y<- y[,drop=TRUE];
x2 <- data202[50001:60000,1:6];
y2 <- data202[50001:60000,8];
y2 <-
2010 Jul 14
1
randomForest outlier return NA
Dear R-users,
I have a problem with randomForest{outlier}.
After running the following code ( that produces a silly data set and builds
a model with randomForest ):
#######################
library(randomForest)
set.seed(0)
## build data set
X <- rbind( matrix( runif(n=400,min=-1,max=1), ncol = 10 ) ,
rep(1,times= 10 ) )
Y <- matrix( nrow = nrow(X), ncol = 1)
for( i in (1:nrow(X))){
2009 Jan 20
1
Can't find -lg2c when installing randomForest
I have search the help archives and can't find a direct reference to the
following issue:
When installing randomForest on under CentOS 5.2 , R version 2.7.1 with gcc
4.1.2.
We receive the following error (see below, can't find –lg2c) it is in the
path!
root@abcsci12 ~]# R CMD INSTALL
/scisys/home/yanicrk/randomForest_4.5-28.tar.gz
* Installing to library
2003 Dec 03
1
Error in randomForest.default(m, y, ...) : negative lengt h vectors are not allowed
Christian --
You don't provide enough information (like a call) to answer this. I
suspect, though, that you may be subsetting in a way that passes
randomForest no data.
I'm not aware offhand of an easy way to get this error from randomForest. I
tried creating some data superficially similar to yours to see whether
something would break if there were only a single value in the variable