DBSCAN implementation (density based spatial clustering) for javascript. Works in node and browser
npm install sdbscanSuper fast density based spatial clustering DBSCAN implementation for unidimiensional and multidimensional data. Works on nodejs and browser.
npm install sdbscan
`Usage
$3
`javascript
const sdbscan = require("sdbscan");var data = [0, 1, 100, 101, 2, 102, 3, 104, 4, 103, 105, 5];
var res = sdbscan(data,2,3);
`$3
`html
`Results
`javascript
{
"noise": [],
"clusters": [
{
"id": 0,
"data": [5,4,3,2,1,0]
},
{
"id": 1,
"data": [105,103,104,102,101,100]
}
]
}
``The function will return an object with the following data:
* noise Points that cannot be added to any cluster.
* clusters An array of clusters, with an ID and the data points belonging to it.