Description Usage Arguments Value Author(s) See Also Examples
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
).
1 | mc.meas.iter(mc.obj, lmod = NULL,type="acc",nam="Model")
|
mc.obj |
|
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 |
Data frame containing statistic of interest at each iteration.
David Enot dle@aber.ac.uk
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.