% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/master.scale.R
\name{master.scale}
\alias{master.scale}
\title{Master Scale}
\usage{
master.scale(data, default_flag, PD, stop.limit = 0,
  min.perc.total = 0.025, min.perc.class = 0.01)
}
\arguments{
\item{data}{A data set needs to be specified including PD variable.}

\item{default_flag}{The default flag need to specified as string.}

\item{PD}{PD variable need to be specified.}

\item{stop.limit}{Stops WOE based merging of the predictor's classes/levels in case the resulting information value (IV) decreases more than x percent (e.g. 0.05 = 5 percent) compared to the preceding binning step. stop.limit=0 will skip any WOE based merging. Increasing the stop.limit will simplify the binning solution and may avoid overfitting. Accepted range: 0-0.5; default: 0.1.}

\item{min.perc.total}{For numeric variables this parameter defines the number of initial classes before any merging is applied. For example min.perc.total=0.05 (5 percent) will result in 20 initial classes. For factors the original levels with a percentage below this limit are collected in a 'miscellaneous' level before the merging based on the min.perc.class and on the WOE starts. Increasing the min.perc.total parameter will avoid sparse bins. Accepted range: 0.0001-0.2; default: 0.05.}

\item{min.perc.class}{If a column percentage of one of the target classes within a bin is below this limit (e.g. below 0.01=1 percent) then the respective bin will be joined with others. In case of numeric variables adjacent predictor classes are merged. For factors respective levels (including sparse NAs) are assigned to a 'miscellaneous' level. Setting min.perc.class>0 may provide more reliable WOE values. Accepted range: 0-0.2; default: 0, i.e. no merging with respect to sparse target classes is applied.}
}
\description{
This function creates a master scale that best describes the target variable according to the given parameters.
}
\examples{
master.scale(example_data, "default_f","Probability")
}
\keyword{creditR}
