README
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.
- weight ?string [
- 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.
- attributes ?object: attributes' names: