Feature encoding
class: scorecardbundle.feature_encoding.WOE.WOE_Encoder
Perform WOE transformation for features and calculate the information value (IV) of features with reference to the target variable y.
Parameters
epslon: float, optional(default=1e-10)
Replace 0 with a very small number during division
or logrithm to avoid infinite value.
output_dataframe: boolean, optional(default=False)
if output_dataframe is set to True. The transform() function will
return pandas.DataFrame. If it is set to False, the output will
be numpy ndarray.
Attributes
iv_: a dictionary that contains feature names and their IV
result_dict_: a dictionary that contains feature names and
their WOE result tuple. Each WOE result tuple contains the
woe value dictionary and the iv for the feature.
Methods
fit(X, y):
fit the WOE transformation to the feature.
transform(X):
transform the feature using the WOE fitted.
fit_transform(X, y):
fit the WOE transformation to the feature and transform it.