Skip to content
HITS algorithm for graphology.
JavaScript
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Initial commit Oct 3, 2016
.travis.yml Fix for latest version Feb 19, 2017
LICENSE.txt Initial commit Oct 3, 2016
README.md Fix for latest version Feb 19, 2017
index.js Fix for latest version Feb 19, 2017
package.json Fix for latest version Feb 19, 2017
test.js Fix for latest version Feb 19, 2017

README.md

Build Status

Graphology HITS

HITS algorithm to be used with graphology.

Installation

npm install graphology-hits

Usage

import hits from 'graphology-hits';

// To compute and return the result as 'hubs' & 'authorities':
const {hubs, authorities} = hits(graph);

// To directly map the result to nodes' attributes:
hits.assign(graph);

// Note that you can also pass options to customize the algorithm:
const {hubs, authorities} = hits(graph, {normalize: false});

Arguments

  • graph Graph: target graph.
  • options ?object: options:
    • attributes ?object: attributes' names:
      • weight ?string [weight]: name of the edges' weight attribute.
      • hub ?string [hub]: name of the node attribute holding hub information.
      • authority ?string [authority]: name of the node attribute holding authority information.
    • maxIterations ?number [100]: maximum number of iterations to perform.
    • normalize ?boolean [true]: should the result be normalized by the sum of values.
    • tolerance ?number [1.e-8]: convergence error tolerance.
You can’t perform that action at this time.