From 1018767a5d805e32a38abe1ba3eea2d0e5445904 Mon Sep 17 00:00:00 2001 From: djm21 Date: Wed, 21 Feb 2024 03:23:53 -0600 Subject: [PATCH] add missing KPI values to dmcas_fitstat from dmcas_roc (with exceptions of _KSPOSTCUTOFF_ and _KSCUT_) --- src/sasctl/pzmm/write_json_files.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/sasctl/pzmm/write_json_files.py b/src/sasctl/pzmm/write_json_files.py index 4972dab2..6160ceb9 100644 --- a/src/sasctl/pzmm/write_json_files.py +++ b/src/sasctl/pzmm/write_json_files.py @@ -1292,6 +1292,16 @@ def calculate_model_statistics( roc_dict = cls.apply_dataframe_to_json(json_dict[1]["data"], i, roc_df) for j in range(len(roc_dict)): json_dict[1]["data"][j].update(roc_dict[j]) + if(roc_dict[j]["dataMap"]["_KS_"] == 1): + fitstat_data = { + "_KS_": roc_dict[j]["dataMap"]["_KS_"], + "_KS2_": roc_dict[j]["dataMap"]["_KS2_"], + "_C_": roc_dict[j]["dataMap"]["_C_"], + "_Gini_": roc_dict[j]["dataMap"]["_Gini_"], + "_Gamma_": roc_dict[j]["dataMap"]["_Gamma_"], + "_Tau_": roc_dict[j]["dataMap"]["_Tau_"] + } + json_dict[0]["data"][i]["dataMap"].update(fitstat_data) lift_df = pd.DataFrame(conn.CASTable("Lift", caslib="Public").to_frame()) lift_dict = cls.apply_dataframe_to_json(json_dict[2]["data"], i, lift_df, 1)