BinCols: Binary columns function

Description Usage Arguments Details Value Examples

Description

This function takes a continuous target vector (ie. the 'y' vector in regression) and generates a matrix of binary target vectors.

Usage

1
BinCols(y, n = 30, mode = "EW", EW.buffer = 0.01)

Arguments

y

The column to be binarized

n

The number of columns in the resulting binary matrix

mode

Defaults to 'EW' intervals, but 'EP' is also available

EW.buffer

Defaults to 0.01, only for EW testing; excludes outliers from width

Details

The options for mode are for equally probable bin sizes ('EP') and equal width bins ('EW') in terms of the values of the target variable. The parameter n corresponds to the number of models that will be in the final local expert ensemble.

Value

A matrix of width equal to n and height equal to length(y)

Examples

1
2
y <- runif(1000, 0, 200)
binary.matrix <- BinCols(y, n = 15, mode = 'EP')

nnormandin/localexpeRt documentation built on May 23, 2019, 9:29 p.m.