augmentation: Augmentation

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/augmentation.R

Description

This function performs Reject Inference using the Augmentation technique. Note that this technique is theoretically better than using the financed clients scorecard in the MAR and misspecified model case.

Usage

1
augmentation(xf, xnf, yf)

Arguments

xf

The matrix of financed clients' characteristics to be used in the scorecard.

xnf

The matrix of not financed clients' characteristics to be used in the scorecard (must be the same features in the same order as xf!).

yf

The matrix of financed clients' labels

Details

This function performs the Augmentation method on the data. When provided with labeled observations (x^\ell,y), it first fits the logistic regression model p_θ of x^\ell on y, then reweighs labeled observations according to their probability of being sampled, i.e. calculates the predicted probabilities of p_θ on all observations, defines score-bands and calculates, in each of these score-bands, the probability of having been accepted as the proportion of labeled samples in that score-band. It then refits a logistic regression model p_η on the labeled samples.

Value

List containing the model using financed clients only and the model produced using the Augmentation method.

Author(s)

Adrien Ehrhardt

References

Enea, M. (2015), speedglm: Fitting Linear and Generalized Linear Models to Large Data Sets, https://CRAN.R-project.org/package=speedglm Ehrhardt, A., Biernacki, C., Vandewalle, V., Heinrich, P. and Beben, S. (2018), Reject Inference Methods in Credit Scoring: a rational review,

See Also

glm, speedglm

Examples

1
2
3
4
5
6
7
# We simulate data from financed clients
df <- generate_data(n = 100, d = 2)
xf <- df[, -ncol(df)]
yf <- df$y
# We simulate data from not financed clients (MCAR mechanism)
xnf <- generate_data(n = 100, d = 2)[, -ncol(df)]
augmentation(xf, xnf, yf)

scoringTools documentation built on Jan. 13, 2021, 8:35 p.m.