RAB: real adaboost (Friedman et al)

Description Usage Arguments Value Author(s) References Examples

View source: R/RAB.R

Description

read adaboost ... a demonstration version

Usage

1
RAB(formula, data, maxiter=200, maxdepth=1)

Arguments

formula

formula – the response variable must be coded -1, 1

data

data

maxiter

maxiter

maxdepth

maxdepth – passed to rpart

Value

an instance of raboostCont

Author(s)

Vince Carey <stvjc@channing.harvard.edu>

References

Friedman et al Ann Stat 28/2 337

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(MASS)
library(rpart)
data(Pima.tr)
data(Pima.te)
Pima.all = rbind(Pima.tr, Pima.te)
tonp = ifelse(Pima.all$type == "Yes", 1, -1)
tonp = factor(tonp)
Pima.all = data.frame(Pima.all[,1:7], mtype=tonp)
fit1 = RAB(mtype~ped+glu+npreg+bmi+age, data=Pima.all[1:200,], maxiter=10, maxdepth=5)
pfit1 = Predict(fit1, newdata=Pima.tr)
table(Pima.tr$type, pfit1)

Example output

Loading required package: Rcpp
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package:BiocGenericsThe following objects are masked frompackage:parallel:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked frompackage:stats:

    IQR, mad, sd, var, xtabs

The following objects are masked frompackage:base:

    anyDuplicated, append, as.data.frame, basename, cbind, colnames,
    dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
    grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
    rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which.max, which.min

Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: annotate
Loading required package: AnnotationDbi
Loading required package: stats4
Loading required package: IRanges
Loading required package: S4Vectors

Attaching package:S4VectorsThe following object is masked frompackage:base:

    expand.grid

Loading required package: XML
Loading required package: cluster

Attaching package:MASSThe following object is masked frompackage:AnnotationDbi:

    select

[1] "real adaboost iterations:"
12345678910     pfit1
       -1   1
  No  132   0
  Yes   0  68

MLInterfaces documentation built on Nov. 8, 2020, 8:14 p.m.