resRF: Random forest model outputs for a xytb object

Description Usage Arguments Value Author(s) See Also Examples

View source: R/xytb-class.R

Description

Diagnostic plots and tables for the random forest model used to predict behaviour on a xytb objecti (random forest convergence plot, variable importance plot, cross-validation plot, confusion matrix of the observed vs predicted behaviours).

Usage

1
resRF(xytb, type = "rf")

Arguments

xytb

An xytb object with a model.

type
  • rf: plot of the OOB versus the number of trees (see randomForest).

  • importance: importance plot (see varImpPlot).

  • rfcv: plot of the cross-validated prediction performance of models with sequentially reduced number of predictors (see rfcv).

  • confusion: confusion matrix between observed and predicted behaviours (see confusionMatrix).

Value

plots or tables.

Author(s)

Laurent Dubroca

See Also

See randomForest

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run:  
#track_CAGA_005 is dataset
#generate a complete xytb object with derived (over moving windows of 3, 5
#and 9 points, with quantile at 0, 50 and 100%) and shifted information on 10
#and 100 points
xytb<-xytb(track_CAGA_005,"a track",c(3,5,9),c(0,.5,1),c(10,100))
#compute a random forest model to predict behaviour (b, where -1 is
#unobserved behaviour) using the derived
#parameters ("actual")
xytb<-modelRF(xytb,"actual",nob="-1",colin=TRUE,varkeep=c("v","thetarel"),
zerovar=TRUE,rfcv=TRUE,step=.9)
#modelling results
resRF(xytb,type="rf")
resRF(xytb,type="importance")
resRF(xytb,type="rfcv")
resRF(xytb,type="confusion")

## End(Not run)

ldbk/m2b documentation built on May 20, 2019, 11:29 p.m.