scorecard_pmml
converts scorecard into PMML format.
scorecard_pmml(card, save_name = NULL, model_name = "scorecard",
model_version = NULL, description = "scorecard", copyright = NULL)
A data frame or a list of data frames. It's a scorecard object generated from the function scorecard
.
A string. The file name to save scorecard. Defaults to None.
A name to be given to the PMML model.
A string specifying the model version.
A descriptive text for the Header element of the PMML.
The copyright notice for the model.
data("germancredit")
dtvf = var_filter(germancredit, y='creditability')
#> ℹ Filtering variables via missing_rate, identical_rate, info_value ...
#> ✔ 1 variables are removed via identical_rate
#> ✔ 6 variables are removed via info_value
#> ✔ Variable filtering on 1000 rows and 20 columns in 00:00:00
#> ✔ 7 variables are removed in total
bins = woebin(dtvf, y='creditability')
#> ℹ Creating woe binning ...
#> ✔ Binning on 1000 rows and 14 columns in 00:00:00
card = scorecard2(bins, dtvf, y='creditability')
# export scorecard into pmml
cardpmml = scorecard_pmml(card)
# save pmml
# cardpmml = scorecard_pmml(card, save_name='scorecard', model_version='1.0')