mc.meas.iter: Summary of a predictor in mc.agg object

Description Usage Arguments Value Author(s) See Also Examples

Description

Convenience function to output statistics related to accuracy, AUC or margins at each iteration for one model or a selection of models contained in a mc.agg object (see details mc.agg).

Usage

1
mc.meas.iter(mc.obj, lmod = NULL,type="acc",nam="Model")

Arguments

mc.obj

mc.agg object - See details mc.agg

lmod

List of models to be considered - Default: all models

type

Predictor type - Can be either acc (accuracy), auc (AUC), mar (margin or equivalent)

nam

List of names to be used in the result - Names given here corresponds to the column name of mc.obj$cldef

Value

Data frame containing statistic of interest at each iteration.

Author(s)

David Enot dle@aber.ac.uk

See Also

mc.agg

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
data(iris)
dat=as.matrix(iris[,1:4])
cl=as.factor(iris[,5])
lrnd=sample(1:150)[1:50]
cl[lrnd]=sample(cl[lrnd])  ## add a bit of misclassification for fun
pars   <- valipars(sampling = "cv",niter = 10, nreps=4)
dat1=dat.sel1(dat,cl,pwise="virginica",mclass=NULL,pars=pars)

res1=lapply(dat1,function(x) accest(x,clmeth="lda"))
res2=lapply(dat1,function(x) accest(x,clmeth="randomForest",ntree=50))

## Aggregate res1 and res2
mc=mc.agg(res1,res2)

## AUC in each model
auc.iter<-mc.meas.iter(mc,type="auc",nam=c("DisId","Alg"))
## Plot them
boxplot(auc.iter)
## Print on the screen
print(auc.iter)

tonedivad/FIEmspro documentation built on May 31, 2019, 6:20 p.m.