doClustering: Cluster variable into auto-optimal bands.

Description Usage Arguments Value Examples

Description

Cluster variable into auto-optimal bands.

Usage

1
2
doClustering(data, name, bad, distanceMethod = "euclidean",
  clustMethod = "ward.D2", eps = 1.05, sen = 1000, ...)

Arguments

data

A data.frame containing the analysed variables.

name

A character name of the column of dependent variable of data to analyse.

bad

A character name of the column of independent variable of data.

distanceMethod

A character, check ?dist.

clustMethod

A character, check ?hclust.

eps

A number which manage how many cluster function returns. The bigger number is the less bands function returns.

sen

A number of sensitive what is the less value of observations in a band. If the number of observation is lower than sen then function returns warning.

...

Nothing.

Value

An object of Clusterrr class which contains WOE, IV, badrate, bands, k number of optimal bands,warnings. It has generic functions for plot() and summary(). Warning dictionary: 0 - no warning 1 - very low number of cases in some bands. IV can be incorrect. 2 - NA detected 3 - 1 + 2 4 - big number of unique values. The cluster bands can be incorrect. 5 - 1 + 4 6 - 2 + 4 7 - 1 + 2 + 4

Examples

1
2
3
4
5
6
7
8
data(lendclub)
x <- doClustering(lendclub, "purpose", "loan_status")
plot(x)
summary(x)
x <- doClustering(lendclub, "purpose", "loan_status", eps=1.0001)
plot(x)
x <- doClustering(lendclub, "purpose", "loan_status", eps=10)
plot(x)

wojciechoblak/varbinq documentation built on May 4, 2019, 9:46 a.m.