CaCu models record the outcomes each split holds
This commit is contained in:
@@ -80,6 +80,9 @@ class Pim:
|
||||
found = {
|
||||
"n_train": len(train),
|
||||
"n_test": len(test),
|
||||
# outcomes, prevalent or incident, each split learned from or was judged on
|
||||
"events_train": float(((train["c"] == 1) | np.isfinite(train["r"])).sum()),
|
||||
"events_test": float(((test["c"] == 1) | np.isfinite(test["r"])).sum()),
|
||||
"neg_loglik": mixture.neg_loglik_,
|
||||
"converged": float(mixture.converged_),
|
||||
}
|
||||
@@ -139,6 +142,8 @@ class Logistic:
|
||||
metrics = {
|
||||
"n_train": len(train),
|
||||
"n_test": len(test),
|
||||
"events_train": float(train["y"].sum()),
|
||||
"events_test": float(test["y"].sum()),
|
||||
"auc": float(roc_auc_score(test["y"], p)),
|
||||
"brier": float(brier_score_loss(test["y"], p)),
|
||||
"positive_rate_train": float(train["y"].mean()),
|
||||
|
||||
Reference in New Issue
Block a user