| predict.scr_pd | R Documentation |
Predict grade and PD from an scr_pd object
## S3 method for class 'scr_pd'
predict(
object,
newdata = NULL,
score = NULL,
type = c("grade", "pd", "pd_final", "score"),
...
)
object |
An |
newdata |
A table with the source columns of the scorecard, scored
with |
score |
Production scores, as an alternative to |
type |
|
... |
Ignored. |
A vector of the length of the input.
Other irb-pd:
predict.scr_grades(),
scr_calibrate(),
scr_grades(),
scr_master_scale(),
scr_migration(),
scr_moc(),
scr_pd(),
scr_pd_pit_ttc(),
scr_pd_validate()
cfg <- scr_config(verbose = FALSE, nthread = 1, use_ranger = FALSE,
use_lightgbm = FALSE, xgb_rounds = 40, n_boot = 10)
d <- scr_demo[, c("default", "ref_date", "ds_region", "ds_band", "vl_score_01",
"vl_score_02", "vl_score_05", "vl_score_10", "vl_hist_01")]
res <- scr_select(d, "default", config = cfg, date_col = "ref_date")
sc <- scr_scorecard(res)
pd <- scr_pd(scr_grades(sc, n_grades = 6, min_defaults = 10))
predict(pd, score = c(480, 560, 640), type = "pd_final")
head(predict(pd, newdata = scr_demo[1:10, ], type = "grade"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.