Skip to content

Commit

Permalink
add missing KPI values to dmcas_fitstat from dmcas_roc (with exceptio…
Browse files Browse the repository at this point in the history
…ns of _KSPOSTCUTOFF_ and _KSCUT_)
  • Loading branch information
djm21 committed Feb 21, 2024
1 parent 73d3d43 commit 1018767
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/sasctl/pzmm/write_json_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1018767

Please sign in to comment.