alteryx / alteryx/evalml

LeadScoring is a special case of CostBenefitMatrix

Ouverte
#1,562 0 commentaires 1 réaction 1 personne assignée Réclamée par @asniyaz Voir sur GitHub
enhancement
Langage dominant
Python
Étoiles
850
Forks
96
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

The `LeadScoring` objective assigns a reward/cost for each true/false positives and computes the average reward as the overall objective score. This is the same as the `CostBenefitMatrix` objective provided the reward for true/false negatives is 0.

Example:

```python
from evalml.objectives import LeadScoring, CostBenefitMatrix
import numpy as np

lead_scoring = LeadScoring(true_positives=10, false_positives=-5)
cost_benefit = CostBenefitMatrix(true_positive=10, false_positive=-5, false_negative=0, true_negative=0)

y_true = np.array([1, 0, 1, 0, 1, 0, 0])
y_pred = np.array([1, 1, 0, 0, 0, 0, 1])

lead_scoring_score = lead_scoring.objective_function(y_true, y_pred)
cost_benefit_score = cost_benefit.objective_function(y_true, y_pred)
assert np.isclose(lead_scoring_score, cost_benefit_score)
```

I think we should either refactor the implementation of `LeadScoring` to use the `CostBenefitMatrix` internally or deprecate `LeadScoring` in favor of `CostBenefitMatrix`.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.