Boosted Regression Tree Modelling


#1

Hi everyone,
I am doing BRT modelling using Elith et al. (2008) R functions script which is given as supplementary materials in their publication. I hope most you seen it once a while. I have a doubt that what is meant for "100" in this script? They were used 1000 sites data for modelling.

# create a vector of randomised numbers and feed into presences
      selector <- rep(0,n.cases)
      temp <- rep(seq(1, n.folds, by = 1), length = n.pres)
      temp <- temp[order(runif(n.pres, 1, 100))]
      selector[presence.mask] <- temp

# and then do the same for absences
      temp <- rep(seq(1, n.folds, by = 1), length = n.abs)
      temp <- temp[order(runif(n.abs, 1, 100))]
      selector[absence.mask] <- temp
      }  

    else {  #otherwise make them random with respect to presence/absence
      selector <- rep(seq(1, n.folds, by = 1), length = n.cases)
      selector <- selector[order(runif(n.cases, 1, 100))]
      }
    }

#2

Hi!

When you have doubts about the parameters of a R function, the best thing to do is to use the excellent help system of R. Just write:

?runif

at the console prompt to get something like this:

https://stat.ethz.ch/R-manual/R-devel/library/stats/html/Uniform.html

You will see that the third argument is the maximum value of the uniform random variable. This is denoted as b in this description of the uniform distribution: