Skip to content

discrete-clustering 0.1.2

Install from the command line:
Learn more about npm packages
$ npm install @indoor-analytics/discrete-clustering@0.1.2
Install via package.json:
"@indoor-analytics/discrete-clustering": "0.1.2"

About this version

@indoor-analytics/discrete-clustering

Clusters a bunch of paths by discretizing space with a given shape.

Paths to cluster Clustering result
30 paths we want to cluster hexagon clustering result
Paths to cluster Clustering result
Corresponding graph getClusteredPath result

How to use

Add this line to ~/.npmrc to set up the package registry:

@indoor-analytics:registry=https://npm.pkg.github.com/indoor-analytics

In your project, install the package:

npm i --save @indoor-analytics/discrete-clustering

Import methods in your code:

import {clusterPaths, getClusteredGraph, getClusteredPath, Shape} from '@indoor-analytics/discrete-clustering';

Discretization

Space can be discretized with different shapes:

  • square
  • triangle
  • hexagon

Size of such shapes can be modified by playing with the granularity parameter of clusterPaths/getClusteredGraph methods.

Errors

If you invoke methods with a high granularity, this might create cells that are isolated from the main cluster, which prevents path extraction.

Paths to cluster
On this example, path extraction from green node to red node will fail, because there's no route linking them

Details


Assets

  • discrete-clustering-0.1.2-npm.tgz

Download activity

  • Total downloads 2
  • Last 30 days 0
  • Last week 0
  • Today 0