Skip to content
Snippets Groups Projects

Add configuration file for Hamming distance algorithm

Merged Vedrana KRIVOKUCA requested to merge add_hamming_dist_config into master
1 unresolved thread

Hamming distance configuration file to supplement distance_euclidean.py and distance_cosine.py in bob.bio.base algorithm configs.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
1 """ This script calculates the Hamming distance (proportion of mis-matching corresponding bits) between two binary arrays """
2
3 import bob.bio.base
4 import scipy.spatial.distance
5
6 algorithm = bob.bio.base.algorithm.Distance(
7 distance_function = scipy.spatial.distance.hamming,
8 is_distance_function = False # setting this to False ensures that Hamming distances are returned as positive values rather than negative
  • added 1 commit

    • 67525c05 - Set is_distance_function to True; specify distance_hamming script in setup.py

    Compare with previous version

  • Done. Sorry, slipped my mind!

  • No worries. There is no-one that knows all the limitations better than me -- I have implemented this package ;-)

  • Manuel Günther mentioned in commit 21e7371f

    mentioned in commit 21e7371f

  • Please register or sign in to reply
    Loading