Skip to content

Commit

Permalink
Use default similarity of 3/4 (fourth quartile) instead of 0.8
Browse files Browse the repository at this point in the history
The choice of 0.8 or 80% was fairly arbitrary and mostly a good
first guess but 0.75 as 3/4 is slightly more forgiving of changes
and easier to keep in mind.
  • Loading branch information
pevogam committed May 7, 2024
1 parent 50f11e2 commit 02f20bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion guibot/finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def __configure_backend(self, backend=None, category="find", reset=False):
log.log(9, "Setting backend for %s to %s", category, backend)
self.params[category] = {}
self.params[category]["backend"] = backend
self.params[category]["similarity"] = CVParameter(0.8, 0.0, 1.0)
self.params[category]["similarity"] = CVParameter(0.75, 0.0, 1.0)
log.log(9, "%s %s\n", category, self.params[category])

def configure_backend(self, backend=None, category="find", reset=False):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def test_similarity(self):
new_image = image.with_similarity(0.45)
self.assertEqual(0.45, new_image.similarity)
# TODO: create a separate config for defaults to extract this from there
self.assertEqual(0.8, image.similarity)
self.assertEqual(0.75, image.similarity)

self.assertEqual(image.filename, new_image.filename)
self.assertNotEqual(image.similarity, new_image.similarity)
Expand Down

0 comments on commit 02f20bb

Please sign in to comment.