Skip to content

Commit

Permalink
remove alpha filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Theodus committed May 7, 2024
1 parent 396c112 commit 9737d67
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions candidate-selection/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,7 @@ where
.filter(|c| selected.iter().all(|s| s.id() != c.id()))
.map(|c| (c, marginal_score(current_score, &selected, c)))
.max_by_key(|(c, marginal_score)| marginal_score / c.fee().as_f64().max(0.01))
.filter(|(c, marginal_score)| {
if *marginal_score.as_ref() <= 0.0 {
return false;
}
if current_score == Normalized::ZERO {
return true;
}
let max_score = 0.5 * *(marginal_score / current_score.as_f64());
c.fee().as_f64() <= max_score
});
.filter(|(_, marginal_score)| *marginal_score.as_ref() > 0.0);
match selection {
Some((selection, _)) => {
selected.push(selection);
Expand Down

0 comments on commit 9737d67

Please sign in to comment.