Пример #1
0
def create_adjusted_predictor(threshold_optimization_method,
                              sensitive_features, labels, scores):
    post_processed_predictor_by_sensitive_feature = threshold_optimization_method(
        sensitive_features, labels, scores)

    return lambda sensitive_features_, scores: _vectorized_prediction(
        post_processed_predictor_by_sensitive_feature, sensitive_features_,
        scores)
Пример #2
0
 def prob_pred(sensitive_features, scores):
     return _vectorized_prediction(
         estimator._post_processed_predictor_by_sensitive_feature,
         sensitive_features, scores)