{"id":23045486,"url":"https://github.com/cdxoo/dbscan","last_synced_at":"2025-08-14T23:32:00.174Z","repository":{"id":50128999,"uuid":"249895850","full_name":"cdxOo/dbscan","owner":"cdxOo","description":"clustering data via DBSCAN","archived":false,"fork":false,"pushed_at":"2023-07-20T16:47:20.000Z","size":582,"stargazers_count":12,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-26T16:24:07.733Z","etag":null,"topics":["clustering-algorithm","dbscan","dbscan-clustering","javascript","nodejs"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cdxOo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-25T05:37:24.000Z","updated_at":"2024-06-18T07:36:42.000Z","dependencies_parsed_at":"2022-08-27T08:21:38.217Z","dependency_job_id":null,"html_url":"https://github.com/cdxOo/dbscan","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/cdxOo/dbscan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdxOo%2Fdbscan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdxOo%2Fdbscan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdxOo%2Fdbscan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdxOo%2Fdbscan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdxOo","download_url":"https://codeload.github.com/cdxOo/dbscan/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdxOo%2Fdbscan/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270500002,"owners_count":24595150,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-14T02:00:10.309Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clustering-algorithm","dbscan","dbscan-clustering","javascript","nodejs"],"created_at":"2024-12-15T21:20:56.715Z","updated_at":"2025-08-14T23:31:59.887Z","avatar_url":"https://github.com/cdxOo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @cdxoo/dbscan\n\nCustomizable DBSCAN clustering for arbirary datasets.\n\n## Installation\n\n    npm install --save @cdxoo/dbscan\n    \n## Usage\n\n```javascript\nconst dbscan = require('@cdxoo/dbscan');\n    \nlet simpleResult = dbscan({\n    dataset: [21,22,23,24, 27,28,29,30, 9001],\n    epsilon: 1.01,\n});\n// =\u003e {\n//    clusters: [ [0,1,2,3], [4,5,6,7] ],\n//    noise: [ 8 ]\n//}\n\nlet objectResult = dbscan({\n    dataset: [{ foo: 21 }, { foo: 22 }, { foo: 27 }, { foo: 28 }],\n    epsilon: 1.1,\n    distanceFunction: (a,b) =\u003e Math.abs(a.foo - b.foo)\n});\n// =\u003e {\n//    clusters: [ [0,1], [2,3] ],\n//    noise: []\n//}\n```\n\n## Parameters\n```javascript\ndbscan({\n    dataset: [],  // An array of datapoints.\n                  // Datapojnts can be anything when you\n                  // use a custom distance function.\n    epsilon: 1.3, // Maximum distance between datapoints.\n                  // Determine if a datapoint is in a cluster or not.\n                  // Default is 1.0\n    epsilonCompare: (distance, epsilon) =\u003e ( /*...*/ ),\n                  // Custom function to compare calculated\n                  // distance and epsilon. Must return true/false.\n                  // Default is (dist, e) =\u003e (dist \u003c e)\n    distanceFunction: (a, b) =\u003e ( /*...*/ ),\n                  // Custom function to calculate the distance\n                  // between two datapoints. Must be given when\n                  // working with higher dimensional datasets,\n                  // or datasets whose items are objects.\n                  // The default function only works on\n                  // one-dimensional data points.\n                  // Defaults is (a, b) =\u003e Math.abs(a - b)\n    minimumPoints: 2,\n                  // Threshold of how many points are needed\n                  // in the same neighborhood to form a cluster.\n                  // Default is 2\n             \n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdxoo%2Fdbscan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdxoo%2Fdbscan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdxoo%2Fdbscan/lists"}