File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -155,18 +155,24 @@ def get_value_and_effective_sample_size(
155155 higher_is_better = False ,
156156)
157157
158- precision_positive = BinaryClassificationRisk (
158+ positive_predicted_value = BinaryClassificationRisk (
159159 risk_occurrence = lambda y_true , y_pred : y_pred == y_true ,
160160 risk_condition = lambda y_true , y_pred : y_pred == 1 ,
161161 higher_is_better = True ,
162162)
163163
164- precision_negative = BinaryClassificationRisk (
164+ ppv = positive_predicted_value
165+ precision_positive = ppv
166+
167+ negative_predicted_value = BinaryClassificationRisk (
165168 risk_occurrence = lambda y_true , y_pred : y_pred == y_true ,
166169 risk_condition = lambda y_true , y_pred : y_pred == 0 ,
167170 higher_is_better = True ,
168171)
169172
173+ npv = negative_predicted_value
174+ precision_negative = npv
175+
170176abstention_rate = BinaryClassificationRisk (
171177 risk_occurrence = lambda y_true , y_pred : np .isnan (y_pred ),
172178 risk_condition = lambda y_true , y_pred : np .repeat (True , len (y_true )),
You can’t perform that action at this time.
0 commit comments