similar to: Execution speed in randomForest

Displaying 20 results from an estimated 1000 matches similar to: "Execution speed in randomForest"

2008 Jul 02
1
randomForest training error
While trying to train randomForest with my dataset, I am ending up with the following error Error in randomForest.default(datatrain, classtrain) : length of response must be the same as predictors My data looks like: A,B,C,D,Class 1,2,1,2,cl1 1,2,1,2,cl1 3,2,1,2,cl2 3,2,1,2,cl2 3,2,1,2,cl2 3,2,1,2,cl2 3,2,1,2,cl2 3,2,1,2,cl2 3,2,1,2,cl2 3,2,12,3,cl2 3,2,1,2,cl2 Actual dataset has around 4000
2007 Nov 26
1
Plotting with R: setting the y axis
I have a series of numbers I'm wanting to plot. They come from a nanodrop machine, which graphs with a specific x and y indices. X goes from 220nm to 350nm, which I can set. But the y axis should go from -5 to 65, but I'm finding it impossible to hardcode that. I've looked. I've typed ?plot at the R prompt. Google has not been my friend. _R Graphics_, if it holds the key, has not
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))){
2023 Mar 19
1
ver el código de randomForest
Hola: No se muy bien si es esto lo que preguntas, pero el código de todos los scripts está en el fichero: https://cran.r-project.org/src/contrib/randomForest_4.7-1.1.tar.gz Saludos. On Sun, 19 Mar 2023 04:35:44 +0100 Manuel Mendoza <mmendoza en fulbrightmail.org> wrote: > Buenos días, ¿cómo podría ver el código con el que el paquete randomForest > hace el random forest? >
2009 Jan 10
0
Rserve/RandomForest does not work with a CSV?
Hi all, We're using Rserve and RandomForest to do classification from within a Java program. The total is about 4 lines of R code: library('randomForest') x y future fit<-randomForest(x,y,no.action=na.roughfix,importance=T,proximity=T) p<-predict(fit, future) What is very frustrating is that we have tried this two different ways (both work in R): 1. Load x, y, and future
2010 Apr 08
1
RandomForest how to identify two classes when only one is present
I'm trying to do: randomForest(f, data = moths.train) But I get this error: Error in randomForest.default(m, y, ...) : Need at least two classes to do classification. When I look at the data for this, I realize there are no positive cases of this item: [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [38] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
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 ).
2006 Jan 03
1
randomForest - classifier switch
Hi I am trying to use randomForest for classification. I am using this code: > set.seed(71) > rf.model <- randomForest(similarity ~ ., data=set1[1:100,], importance=TRUE, proximity=TRUE) Warning message: The response has five or fewer unique values. Are you sure you want to do regression? in: randomForest.default(m, y, ...) > rf.model Call: randomForest(x = similarity ~ .,
2009 Jul 22
1
margins defined in randomForest and supclust
Hi there, How to solve the conflicts as to the same object between two packages, for example, like margins in both randomForest and supclust? When both libraries are installed, supclust will complain "margins" defined in randomForest. I can only solve it by re-starting R, which is very inconvenient, any clever way? Thanks, Weiwei -- Weiwei Shi, Ph.D Research Scientist GeneGO, Inc.
2012 Jan 25
1
Error in predict.randomForest ... subscript out of bounds with NULL name in X
RF trains fine with X, but fails on prediction > library(randomForest) > chirps <- c(20,16.0,19.8,18.4,17.1,15.5,14.7,17.1,15.4,16.2,15,17.2,16,17,14.1) > temp <- c(88.6,71.6,93.3,84.3,80.6,75.2,69.7,82,69.4,83.3,78.6,82.6,80.6,83.5,76 .3) > X <- cbind(1,chirps) > rf <- randomForest(X, temp) > yp <- predict(rf, X) Error in predict.randomForest(rf, X) : subscript
2005 Aug 15
2
randomForest Error passing string argument
I'm attempting to pass a string argument into the function randomForest but I get an error: state <- paste(list("fruit ~", "apples+oranges+blueberries", "data=fruits.data, mtry=2, do.trace=100, na.action=na.omit, keep.forest=TRUE"), sep= " ", collapse="") model.rf <- randomForest(state) Error in if (n==0) stop ("data(x) has 0
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
2008 Jul 03
1
randomForest.error: length of response must be the same as predictors
My data looks like: A,B,C,D,Class 1,2,0,2,cl1 1,5,1,9,cl1 3,2,1,2,cl2 7,2,1,2,cl2 2,2,1,2,cl2 1,2,1,5,cl2 0,2,1,2,cl2 4,2,1,2,cl2 3,5,1,2,cl2 3,2,12,3,cl2 3,2,4,2,cl2 **The steps followed are: trainfile <- read.csv("TrainFile",head=TRUE) datatrain <- subset(trainfile,select=c(-Class)) classtrain <- (subset(trainfile,select=Class)) rf <- randomForest(datatrain, classtrain)
2010 Nov 10
2
randomForest can not handle categorical predictors with more than 32 categories
I received this error Error in randomForest.default(m, y, ...) : Can not handle categorical predictors with more than 32 categories. using below code library(randomForest) library(MASS) memory.limit(size=12999) x <- read.csv("D:/train_store_title_view.csv", header=TRUE) x <- na.omit(x) set.seed(131) sales.rf <- randomForest(sales ~ ., data=x, mtry=3, importance=TRUE) My
2013 Jan 28
1
RandomForest and Missing Values
Dear All, I would like to use a randomForest algorithm on a dataset. The set is not particularly large/difficult to handle, but it has some missing values (both factors and numerical values). According to what I found https://stat.ethz.ch/pipermail/r-help/2005-September/078880.html https://stat.ethz.ch/pipermail/r-help/2007-January/123117.html the randomForest package has a problem with missing
2012 May 05
1
No Data in randomForest predict
I would like to ask a general question about the randomForest predict function and how it handles No Data values. I understand that you can omit No Data values while developing the randomForest object, but how does it handle No Data in the prediction phase? I would like the output to be NA if any (not just all) of the input data have an NA value. It is not clear to me if this is the default or
2003 Aug 04
2
na.action in randomForest
The help page for randomForest shows na.action=na.fail as a parameter, and does not describe other possibilities for na.action. I have a regression problem, with about 1000 rows in my data frame, and with an NA in occasional predictor variables, in about 5% of rows. I would like to have all rows included in the analysis, to the extent possible. (That seems to be possible in rpart, for example.)
2004 Oct 13
0
Problems with randomForest for regression
Dear list, I am trying to do a benchmark study for my case study. It is a regression problem. Among other models I use randomForest. Using the following code the result is around 0.628, and this make sense comparing with other methods. The Theil function implements Theil's U statistic. I do not present the definition of some variables because it is not important to understand my problem.
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
2012 Dec 03
1
How do I make R randomForest model size smaller?
I've been training randomForest models on 7 million rows of data (41 features). Here's an example call: myModel <- randomForest(RESPONSE~., data=mydata, ntree=50, maxnodes=30) I thought surely with only 50 trees and 30 terminal nodes that the memory footprint of "myModel" would be small. But it's 65 megs in a dump file. The object seems to be holding all sorts of