gaussianEncode: gaussianEncode

Description Usage Arguments Value

View source: R/encodings.R

Description

gaussianEncode

Usage

1
gaussianEncode(dt, vars, newMean = 0, newSD = 1, encodeNA = NA)

Arguments

dt

Dataset to create object on.

vars

variables you want to include in the encoding.

encodeNA

If FALSE, NAs will remain NA even if they would have been grouped. If TRUE, NAs will be grouped, but only if they are 'rare'. If they are not rare, NAs will be untouched.

minPerc

Minimum percentage of the total population required for a group to be considered 'rare'. For example, if minPerc = 0.1, and Gender = 'Female' only makes up 5 Female would be replaced with the string in newString.

minCount

Can be provided instead of minPerc if you have a better idea of credibility in terms of total samples required. Levels with counts below this value will be grouped into newstring.

newString

Value you want to group rare levels together as.

Value

Rare Encoded Object


AnotherSamWilson/helperFuncs documentation built on Oct. 1, 2019, 8:51 p.m.