Skip to content

Commit

Permalink
transform scores
Browse files Browse the repository at this point in the history
  • Loading branch information
huiwengoh committed Feb 27, 2024
1 parent 09245a9 commit 99268ce
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cleanlab/regression/learn.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,11 @@ def find_label_issues(
"If uncertainty is passed in as an array, it must have the same length as y."
)

label_quality_scores = np.exp(-abs(residual) / (uncertainty + TINY_VALUE))
residual_adjusted = abs(residual / (uncertainty + TINY_VALUE))

# adjust lqs by the median (for more human-readable scores)
residual_median = max(np.median(residual_adjusted), TINY_VALUE)
label_quality_scores = np.exp(-residual_adjusted / residual_median)

label_issues_mask = np.zeros(len(y), dtype=bool)
num_issues = math.ceil(len(y) * self.k)
Expand Down

0 comments on commit 99268ce

Please sign in to comment.