Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.bio.base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.bio.base
Commits
6b73cb68
There was a problem fetching the pipeline summary.
Commit
6b73cb68
authored
7 years ago
by
Vedrana KRIVOKUCA
Browse files
Options
Downloads
Patches
Plain Diff
Add configuration file for Hamming distance algorithm
parent
55b0d0d1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!110
Add configuration file for Hamming distance algorithm
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/bio/base/config/algorithm/distance_hamming.py
+9
-0
9 additions, 0 deletions
bob/bio/base/config/algorithm/distance_hamming.py
with
9 additions
and
0 deletions
bob/bio/base/config/algorithm/distance_hamming.py
0 → 100644
+
9
−
0
View file @
6b73cb68
"""
This script calculates the Hamming distance (proportion of mis-matching corresponding bits) between two binary arrays
"""
import
bob.bio.base
import
scipy.spatial.distance
algorithm
=
bob
.
bio
.
base
.
algorithm
.
Distance
(
distance_function
=
scipy
.
spatial
.
distance
.
hamming
,
is_distance_function
=
False
# setting this to False ensures that Hamming distances are returned as positive values rather than negative
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment