dbscan 0.1.1 copy "dbscan: ^0.1.1" to clipboard
dbscan: ^0.1.1 copied to clipboard

Dart 1 only

A clustering package utilizing density based spatial clustering for applications with noise.

DBSCAN #

Density Based Spatial Clustering for Applications with Noise #

A spatial clustering library for dart for use any time you need to organize sets of data into groups of nearby clusters .

Usage #

A simple usage example:

import 'dart:math';
import 'package:dbscan/dbscan.dart';

main() {
  List<Point<double>> _dataset = [
    new Point(1.0, 3.0),
    new Point(0.0, 0.0),
    new Point(2.0, 0.0),
    new Point(1.0, 1.0),
    new Point(3.0, 1.0),
    new Point(2.0, 3.0),
    new Point(1.0, 1.0),
    new Point(1.0, 2.0),
    new Point(0.0, 2.0),
    new Point(2.0, 3.0),
    new Point(3.0, 0.0),
    new Point(0.0, 1.0),
    new Point(1.0, 2.123),
  ];

  double distanceSigma = 1.25;
  int minimumNumberOfPointsInCluster = 4;

  var pointClusterer = new DBSCAN(_dataset, distanceSigma, 4, (Point<double> pointA, Point<double> pointB) {
    return sqrt(pow(pointA.x - pointB.x, 2) + pow(pointA.y - pointB.y, 2));
  });

  print('Clusters: ${pointClusterer.clusters}');
  print('Noise: ${pointClusterer.noise}');
}
0
likes
40
pub points
0%
popularity

Publisher

unverified uploader

A clustering package utilizing density based spatial clustering for applications with noise.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

More

Packages that depend on dbscan