randomPTF: Random transfer functions to calculate variable importance

randomPTFR Documentation

Random transfer functions to calculate variable importance

Description

Function for calculating the important of each taxon (predictor) in palaeoecological transfer functions

Usage

randomPTF(spec, env, fun, ncol = 1, nVar, nTF = 500, verbose = TRUE, 
          do.parallel = FALSE, ...)

## S3 method for class 'randomPTF'
plot(x, use.pointLabel=TRUE, ...)

## S3 method for class 'randomPTF'
print(x, ...)

Arguments

spec

a data frame or matrix of biological abundance data.

env

a vector of environmental values to be modelled.

fun

a transfer function method. Additional arguments can be passed with ...)

ncol

some transfer functions return more than one column of results, for example with different WAPLS components. col selects which column to use. See the relevant transfer function method help file.

nVar

number of variables (ie. species) to use in each randomisation (defaults to nsp/3).

nTF

number of random transfer functions to create (default=500).

verbose

logical show feedback during cross-validation.

do.parallel

logical to run in parallel on multi-core machines. If true a suitable parallel back-end should be installed (see examples).

...

additional parameters to the transfer function call.

x

an object of class randomPTF.

use.pointLabel

argument is deprecated.

Details

Function randomPTF calculates taxon importance values using a method analogous to that used in random forests and described in Juggins et al. (2015).

The parallel version can give c. 3 times speed-up on a quad-core machine.

Value

Function randomPTF returns an object of class randomPTF with the following named elements:

VI

taxon importance values, ordered form high to low.

spec

original species data frame.

env

original vector of environmental values.

Author(s)

Steve Juggins

References

Juggins S, Simpson GL, Telford RJ. Taxon selection using statistical learning techniques to improve transfer function prediction. The Holocene 2015; 25: 130-136.

Examples

## Not run: 
data(SWAP)
result <- randomPTF(SWAP$spec, SWAP$pH, fun=WA)
plot(result, cex=0.6)
print(result)
# parallel version
if (.Platform$OS.type=='windows') {
  library(doParallel)
  registerDoParallel(cores=4)
} else {
  library(doMC)
  registerDoMC(cores=4)
}
system.time(result <- randomPTF(SWAP$spec, SWAP$pH, fun=WA, do.parallel=TRUE, nTF=5000))
## End(Not run)

rioja documentation built on Oct. 19, 2023, 5:08 p.m.

Related to randomPTF in rioja...