...
On 10 mar, 17:00, "Liaw, Andy" <[EMAIL PROTECTED]> wrote:
> Are you sure there are 100 sites in your data? Here's an example:
>
> R> library(randomForest)randomForest4.5-23
> Type rfNews() to see new features/changes/bug fixes.
> R> f <- factor(sample(1:4, nrow(iris), replace=TRUE))
> R> rf1
Dear Naiara and Andy,
My strategy in cases with unbalanced data is:
tmp <- as.vector(table(factors));
num_clases <- length(tmp);
min_size <- tmp[order(tmp,decreasing=FALSE)[1]];
vector_for_sampsize <- rep(min_size,num_clases);
Then:
randomForest(..., y=factors, sampsize=vector_for_sampsize)
I h
Are you sure there are 100 sites in your data? Here's an example:
R> library(randomForest)
randomForest 4.5-23
Type rfNews() to see new features/changes/bug fixes.
R> f <- factor(sample(1:4, nrow(iris), replace=TRUE))
R> rf1 <- randomForest(iris[1:4], iris[[5]], strata=f, sampsize=rep(5,
nlevels(
3 matches
Mail list logo