Description Usage Arguments Value Author(s) Examples

The function takes base data, target and the numerical variable which is to be binned. It returns the optimal cuts based on recursive partitioning decision tree such that the trend of event rate holds good ie. it is strictly monotonically increasing or decreasing. If missing values are imputed by any extreme value, the same can be passed as an argument, and it will be shown as a different category. The output is a dataframe with the WOE and IV value.

1 2 | ```
dtree_trend_iv(base, target, variable, num_missing = -99999,
mincriterion = 0.1, event = 1)
``` |

`base` |
input dataframe |

`target` |
column / field name for the target variable to be passed as string (must be 0/1 type) |

`variable` |
numerical variable name which is to be binned into categorical buckets, to be passed as string |

`num_missing` |
(optional) imputed missing value for numerical variable or an array of values which are to be kept as different bucket in binning step (default value is -99999) |

`mincriterion` |
(optional) the value of the test statistic or (1 - p-value) that must be exceeded in order to implement a split (default value is 0.1) |

`event` |
(optional) the event class, to be passed as 0 or 1 (default is 1) |

The function returns a dataframe with count and iv.

Arya Poddar <aryapoddar290990@gmail.com>

Aiana Goyal <aianagoel002@gmail.com>

1 2 3 |

```
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.