JSPM

hamming-dist

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q19106F
  • License MIT

Given 2 arrays, hamming distance is calculated between them.

Package Exports

  • hamming-dist

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (hamming-dist) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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.

Supervision Team

Bruno Gonçalves (iMM) | Alexandre Francisco (INESC-ID & IST) | João Carriço (iMM & IST)

I am deeply grateful for their help along this unique journey...