Returns a bootstrap aggregation of adaptive histograms

Share:

Description

Returns a bootstrap aggregation of CART-histograms or greedy histograms.

Usage

1
2
3
eval.bagg(dendat, B, leaf, minobs = NULL, seed = 1, sample = "bagg", 
prune = "off", splitscan = 0, seedf = 1, scatter = 0, src = "c", 
method = "loglik")

Arguments

dendat

n*d data matrix

B

positive integer; the number of aggregated histograms

leaf

the cardinality of the partitions of the aggregated histograms

minobs

non-negative integer; a property of aggregated histograms; splitting of a bin will be continued if the bin containes "minobs" or more observations

seed

the seed for the random number generation of the random selection of the bootstrap sample

sample

"bagg" or "worpl"; the bootstrapping method; "worpl" for the n/2-out-of-n without replacement; "bagg" for n-out-of-n with replacement

prune

"on" or "off"; if "on", then CART-histograms will be aggregated; if "off", then greedy histograms will be aggregated

splitscan

internal (how many splits will be used for random split selection)

seedf

internal (seed for random split selection)

scatter

internal (random perturbation of observations)

src

internal ("c" or "R" code)

method

"loglik" or "projec"; the empirical risk is either the log-likelihood or the L2 empirical risk

Value

An evaluation tree

Author(s)

Jussi Klemela

See Also

lstseq.bagg, eval.cart, eval.greedy

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
library(denpro)
dendat<-sim.data(n=600,seed=5,type="mulmodII")

leaf<-7     # number of leaves in the histograms
seed<-1     # seed for choosing bootstrap samples
sample="worpl" # without-replacement bootstrap
prune="on"  # we use CART-histograms
B<-5        # the number of histograms in the average

eva<-eval.bagg(dendat,B,leaf,seed=seed,sample=sample,prune=prune)

dp<-draw.pcf(eva,pnum=c(60,60))
persp(dp$x,dp$y,dp$z,theta=-20,phi=30)