Add configuration file for Hamming distance algorithm
1 unresolved thread
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
Activity
assigned to @mguenther
Will let @mguenther take care of that...
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 changed this line in version 2 of the diff
Maybe you also want to register this as a resource in
setup.py
, see: https://gitlab.idiap.ch/bob/bob.bio.base/blob/75fa5d37557993947c6cd84b5089ed63e766b5e0/setup.py#L108added 1 commit
- 67525c05 - Set is_distance_function to True; specify distance_hamming script in setup.py
mentioned in commit 21e7371f
Please register or sign in to reply