Description Usage Arguments Details Value Examples
Bin is a generic function that works differently depending on the inputs.
1 |
x |
A numeric or factor variable or a |
y |
A binary, numeric variable with values of 0 and 1 only. |
w |
An optional numeric vector of positive weights. |
seg |
An optional segment |
name |
Name of the bin. Automatically provided if binning a |
... |
Additional arguments passed on to the Bin method that control discretization. See details for available options |
Additional options can be passed to Bin
to control the discretization process. These
arguments are as follows:
min.iv The gain in information value for a split to occur. Defaults to 0.001.
min.cnt The minimum number of observations after a split.
min.res The minimum number of response after a split.
mono The direction of the monotonic relationship between the independent variable and the response. Splits that would violate this relationship are ignored. Valid values are:
0 No monotonocity
1 Increasing monotonicity
-1 Decreasing monotonicity
2 Either increasing or decreasing monotonicity. monotonicity is enforced by using the direction of the first, unconstrained split for all subsequent splits.
exceptions A numeric vector of special values, or exceptions, that are excluded from the discretization process. Exception values will always be held out as their own bins.
Bin will return various binned objects depending on the arguments provided:
x = numeric or factor
A single bin object of class continuous
or
Discrete
.
x = data.frame
A Classing
object.
x = data.frame & seg = factor
A Segmented-Classing
object is returned.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.