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 14 variables (15.0 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.
#> 396.1 494.2 518.3 519.2 545.3 628.2
# }
