search for: rf1

Displaying 14 results from an estimated 14 matches for "rf1".

Did you mean: rc1
2005 Mar 23
4
sampling from a mixture distribution
Dear R users, I would like to sample from a mixture distribution p1*f(x1)+p2*f(x2). I usually sample variates from both distributions and weight them with their respective probabilities, but someone told me that was wrong. What is the correct way? Vumani
2010 May 22
0
multiple imputation based on a condition
Any suggestions on the following would be grateful. I'm trying to impute data, where a fictitional dataset is defined as... set.seed(110) n <- 500 test <- data.frame(smoke_status = rbinom(n, 2, 0.6), smoke_amount = rbinom(n, 2, 0.5), rf1 = rnorm(n), rf2 = rnorm(n), outcome = rbinom(n, 1, 0.3)) # smoke_status (0, 1, 2) is c("non-smoker, "ex-smoker", "current_smoker"), and # smoke_amount (0, 1, 2) is c("light", "moderate", "heavy") # rf1 and rf2 are two other risk factors (for...
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
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
2004 Sep 24
3
Error with repeat lines() in function
I have a function that does some plotting. I then add lines to the plot. If executed one line at a time, there is not a problem. If I execute the function, though, I get: Error in ans[[1]] : subscript out of bounds This always occurs after the second lines command, and doesn't happen with all of my data points (some do not have errors). Any ideas? Thanks, Sean
2011 Dec 15
2
Random Forest Reading N/A's, I don't see them
...a, I'm unable to identify an instances. Yet when I attempted to use the data in Random Forest, I get the following error. Is there something that Random Forest is reading as null which is not actually null? Is there a better way to check for this? > library(randomForest) > system.time( + rf1 <- randomForest(as.matrix(cm3[,c(2:length(colnames(cm3)))]), + cm3[,1],data=cm3,ntree=50) + ) *Error in randomForest.default(as.matrix(cm3[, c(2:length(colnames(cm3)))]), : NA/NaN/Inf in foreign function call (arg 1) In addition: Warning message: In storage.mode(x) <- "double" :...
2011 Mar 07
2
use "caret" to rank predictors by random forest model
...ctors using random forest model and draw predictors importance plot. I used below commands: rf.fit<-randomForest(x,y,ntree=500,importance=TRUE) ## "x" is matrix whose columns are predictors, "y" is a binary resonse vector ## Then I got the ranked predictors by ranking "rf1$importance[,"MeanDecreaseAccuracy"]" ## Then draw the importance plot varImpPlot(rf.fit) As you can see, all the functions I used are directly from the package "randomForest", instead of from "caret". so I'm wondering if the package "caret" has some...
2010 Dec 11
1
randomForest: help with combine() function
I've built two RF objects (RF1 and RF2) and have tried to combine them, but I get the following error: Error in rf$votes + ifelse(is.na(rflist[[i]]$votes), 0, rflist[[i]]$votes) : non-conformable arrays In addition: Warning message: In rf$oob.times + rflist[[i]]$oob.times : longer object length is not a multiple of shorter...
2008 Mar 09
1
sampsize in Random Forests
Hi all, I have a dataset where each point is assigned to a class A, B, C, or D. Each point is also assigned to a study site. Each study site is coded with a number ranging between 1-100. This information is stored in the vector studySites. I want to run randomForests using stratified sampling, so I chose the option strata = factor(studySites) But I am not sure how to control the number of
2012 Aug 15
0
[LLVMdev] clang promoting local to global
...t;> > >>> What does your testcase look like? > >>> > >>> -Eli > >> > >> > > > #define other_def(x, tab, vf, rf, c) (x ^ tab[0][x ^ c0 ^ vf ^ rf ^ c) #define my_def(y,x,k,c) defs(y,c) = (k}[c] ^ other_def(x, it_tab, inv_var, rf1, c) void my_func() { #define r10(p,q,r,s) 0x##s##r##q##p #undef r #define r r10 const word it_tab[4][256] = { r(const, const, const, const), r(.......), r(.......) ....... }; } You prefer bottom posting? Ok. -------------- next part -------------- An HTML attachment was scrubbed......
2012 Jun 06
0
randomForest Species Distribution Modelling
...appologise if this is a rudimentary question and long winded but I just wanted to let ye know where I'm comming from. I'm new to R and I'm trying to use the 'randomForest' package to classify and predict. The Error message that is troubling me is: > pr<-predict(predictors,rf1, ext=ext) Error in x[...] <- m : NAs are not allowed in subscripted assignments In addition: Warning message: 'newdata' had 153595 rows but variable(s) found have 109 rows My steps are outlinded below which hopefully will give you insight into where I'm going horribly wrong. S...
2012 Aug 15
2
[LLVMdev] clang promoting local to global
On Wed, Aug 15, 2012 at 3:17 PM, Ryan Taylor <ryta1203 at gmail.com> wrote: > So there are some #define (defined outside the function scope) that use > it_tab that are used inside the function, is this why it is promoting it to > a global? Macros shouldn't matter. Please give a complete testcase and steps to reproduce. And please don't top-post. -Eli > > On Wed,
2005 Jul 08
1
Possible Solution to Tempfile error (for documentation)
...cuments using data from each row in the dataframe. It appears that this technique is not scalable to large dataframes without making some changes to the way tempfiles are handled. In the background, R generates tempfiles in a directory using a sequential number. In my case, the numbers ranged from Rf1 to Rf32767. The next in line would of course be Rf32768. This number happens to coincide with 2^15-1, which my programmer colleagues tell me is the maximum positive value a software program with 16 bit processing can create. So, R recognizes that it cannot create a new tempfile and stops the loop....
2010 Dec 11
0
is there a packge or code to generate markov chains in R
...00 From: Dennis Duro <dennis.duro at gmail.com> To: r-help at r-project.org Subject: [R] randomForest: help with combine() function Message-ID: <AANLkTind5kV=Ku5GXX=YGvk5fx5DY-cRE_gbHCGB=QYz at mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 I've built two RF objects (RF1 and RF2) and have tried to combine them, but I get the following error: Error in rf$votes + ifelse(is.na(rflist[[i]]$votes), 0, rflist[[i]]$votes) : non-conformable arrays In addition: Warning message: In rf$oob.times + rflist[[i]]$oob.times : longer object length is not a multiple of shorter...