complexity: Calculates complexity of a prediction rule ensemble.

Description Usage Arguments Value Examples

Description

complexity returns the complexity (total number of variables in the ensemble, number of terms and mean number of variables per term) of a prediction rule ensembles (i.e., an object of class 'pre' or 'premixed').

Usage

1
complexity(object, penalty.par.val = "lambda.1se", ...)

Arguments

object

an object of class 'pre' or premixed'.

penalty.par.val

As usual.

...

not currently used.

Value

Returns a vector with the total number of variables in the ensemble, the total number of terms (i.e., baselearners with a non-zero coefficient), and the mean number of variables per term) in the ensemble.

Examples

1
2
3
4
set.seed(42)
airq <- airquality[complete.cases(airquality),]
airq.ens1 <- premixed(Ozone ~ 1 | Month | Solar.R + Wind + Temp + Day, data = airq, ntrees = 10)
complexity(airq.ens1)

marjoleinF/premixed documentation built on May 27, 2019, 4:50 a.m.