hamming-dist
v1.0.1
Published
Given 2 arrays, hamming distance is calculated between them.
Downloads
6
Maintainers
Readme
Hamming Distance
Description
Given 2 arrays, this algorithm calculates the number of differences between their values.
Usage
Install package using NPM.
npm i --save distance-hamming
Require it using Node.js.
const hamming = require('distance-hamming');
Run it!
let node2com = hamming.jHamming(nodes, links, min);
// node2com = {nodeID1: commmunityID1, nodeID2: commmunityID2...}
// nodes = [nodeID1, nodeID2...]
// links = [{source: nodeID1, target: nodeID2, value: weight ...}]
// Whenever the MDL between 2 partitions is lower than a value "min", the iteration stops.
More
Community Finding with Applications on Phylogenetic Networks (Master Thesis)
Louvain, Infomap, Layered Label Propagation, Label Propagation, Hamming Distance, Girvan-Newman Benchmark and Normalized Mutual Information algorithms were developed in JavaScript. To visualize the results, an interface using D3.js (SVG and Canvas) and Cytoscape was implemented. Every community finding algorithm was tested in terms of accuracy, speed and memory against 2 synthetic networks (Girvan-Newman and Lacichinetti-Fortunato-Radicchi networks with varying parameters). Final goal was to cluster microbiological data.
Check out more in the thesis website. You may also download an image of the application in Docker Hub. A description video is below.
Supervision Team
Alexandre Francisco (INESC-ID & IST) | João Carriço (iMM) | Vítor Borges (INSA)