rTerm: Wrapper Functions for terms in gpe

Description Usage Arguments Details Value References See Also Examples

View source: R/gpe.R

Description

Wrapper functions for terms in gpe.

Usage

1
2
3
4
5
rTerm(x)

lTerm(x, lb = -Inf, ub = Inf, scale = 1/0.4)

eTerm(x, scale = 1/0.4)

Arguments

x

Input symbol.

lb

Lower quantile when winsorizing. -Inf yields no winsorizing in the lower tail.

ub

Lower quantile when winsorizing. Inf yields no winsorizing in the upper tail.

scale

Inverse value to time x by. Usually the standard deviation is used. 0.4 / scale is used as the multiplier as suggested in Friedman & Popescu (2008) and gives each linear term the same a-priori influence as a typical rule.

Details

The motivation to use wrappers is to ease getting the different terms as shown in the examples and to simplify the formula passed to cv.glmnet in gpe. lTerm potentially rescales and/or winsorizes x depending on the input. eTerm potentially rescale x depending on the input.

Value

x potentially transformed with additional information provided in the attributes.

References

Friedman, J. H., & Popescu, B. E. (2008). Predictive learning via rule ensembles. The Annals of Applied Statistics, 2(3), 916-954.

See Also

gpe, gpe_trees gpe_linear gpe_earth

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
mt <- terms(
~ rTerm(x1 < 0) + rTerm(x2 > 0) + lTerm(x3) + eTerm(x4), 
specials = c("rTerm", "lTerm", "eTerm"))
attr(mt, "specials")
# $rTerm
# [1] 1 2
# 
# $lTerm
# [1] 3
# 
# $eTerm
# [1] 4

pre documentation built on March 13, 2020, 2:23 a.m.

Related to rTerm in pre...