| predict.scr_grades | R Documentation |
Grade a score vector with the cut points of an scr_grades object
## S3 method for class 'scr_grades'
predict(object, score, type = c("grade", "pd"), ...)
object |
An |
score |
Numeric production scores. |
type |
|
... |
Ignored. |
A vector of the length of score.
Other irb-pd:
predict.scr_pd(),
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)
gr <- scr_grades(sc, scr_calibrate(sc, target = 0.06), n_grades = 7, min_defaults = 10)
predict(gr, score = c(480, 560, 640))
predict(gr, score = c(480, 560, 640), type = "pd")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.