Skip to content

Commit

Permalink
Make rank -> relevance conversion linear
Browse files Browse the repository at this point in the history
  • Loading branch information
Bisaloo committed Nov 27, 2024
1 parent 2d8ffd2 commit 1c1f7bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plumber.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function(query) {
input = query,
embeddings = pkgmatch.epi::epi_embeddings
)
matches$relevance <- 1 / matches$rank # FIXME: use better function
matches$relevance <- 1 - matches$rank / nrow(matches) # FIXME: use better function
matches <- matches[, colnames(matches) != "rank"]

matches <- merge(matches, pkgmatch.epi::pkgs_metadata)
Expand Down

0 comments on commit 1c1f7bc

Please sign in to comment.