Applies a fitted scorecard to new data. Reads only the binning, the
coefficients and the scaling — never the raw fitted model — so a scorecard
saved with saveRDS() keeps scoring after the engine's package is gone.
Examples
# \donttest{
german <- read.csv(
gzfile(system.file("extdata", "germancredit.csv.gz",
package = "OptimalBinningWoE"
)),
stringsAsFactors = FALSE
)
german$default <- 1L - german$credit_risk
german$credit_risk <- NULL
sc <- obwoe_scorecard(german, target = "default", seed = 1)
#> Warning: 210 events for 13 variables (16.2 per variable): below the 20-events-per-variable rule of thumb, so the coefficients are unstable.
summary(predict(sc, german))
#> Min. 1st Qu. Median Mean 3rd Qu. Max.
#> 420.4 494.4 517.1 517.5 538.7 629.8
# }
