File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,8 +90,8 @@ from optimal_cutoffs import optimize_decisions
9090# False negatives cost 10x more than false positives
9191cost_matrix = [[0 , 1 ], [10 , 0 ]]
9292
93- result = optimize_decisions(y_probs , cost_matrix)
94- y_pred = result.predict(y_probs_new ) # Bayes-optimal decisions
93+ result = optimize_decisions(y_score , cost_matrix)
94+ y_pred = result.predict(y_score_new ) # Bayes-optimal decisions
9595```
9696
9797## API Overview
@@ -107,7 +107,7 @@ from optimal_cutoffs import optimize_thresholds, optimize_decisions
107107result = optimize_thresholds(y_true, y_scores, metric = " f1" )
108108
109109# For cost matrix optimization (no thresholds)
110- result = optimize_decisions(y_probs , cost_matrix)
110+ result = optimize_decisions(y_score , cost_matrix)
111111```
112112
113113### Progressive Disclosure: Power When You Need It
You can’t perform that action at this time.
0 commit comments