{"_id":"@apr144/dbscan","name":"@apr144/dbscan","dist-tags":{"latest":"1.1.1"},"versions":{"1.1.1":{"name":"@apr144/dbscan","version":"1.1.1","main":"src/index.js","types":"types/index.d.ts","scripts":{"test":"npm run test:functional && npm run test:module-interface","test:dtslint":"npx dtslint --localTs node_modules/typescript/lib ./types","test:functional":"npx mocha --config mocha.config.json test/functional","test:module-interface":"npx mocha --config mocha.config.json test/module-interface/all-tests.spec.js","prepublishOnly":"npm test","release:dry":"npx release-it --dry-run --no-npm","release:beta":"release-it --preRelease=beta","release":"release-it"},"author":{"name":"Jan Schwalbe"},"license":"MIT","publishConfig":{"access":"public"},"devDependencies":{"chai":"^4.3.7","dtslint":"^4.2.1","mocha":"^10.2.0","release-it":"^15.11.0"},"description":"Customizable DBSCAN clustering for arbitrary datasets","repository":{"type":"git","url":"git+https://github.com/alexpreynolds/dbscan.git"},"keywords":["cluster","clustering","DBSCAN","density","density-based-clustering","statistics"],"bugs":{"url":"https://github.com/cdxOo/dbscan/issues"},"homepage":"https://github.com/cdxOo/dbscan#readme","_id":"@apr144/dbscan@1.1.1","gitHead":"91a03abbdb4bb30edc2c54d1a9c16b60857ea0ae","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-T+TWntQ3+WWv0wT2HKPO+yvOfRJ1IkGKyVeRyUxHmcuw2hVBRrPeXzQOMxHolJ0Nbn7KJ1/AspdUNHt8CZ7mTA==","shasum":"44dbddd85afd3c659fb2659941897e7f84679ed7","tarball":"https://registry.npmjs.org/@apr144/dbscan/-/dbscan-1.1.1.tgz","fileCount":17,"unpackedSize":12235,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBwhSSzkuSMj9i9+HOw+3XjJt56fkFsOcyMpEXK3A2d4AiAIRclLfL1wjCafQ6o1ipeOQ21wDm0afoE2rdsi2T80wQ=="}]},"_npmUser":{"name":"apr144","email":"alexpreynolds@gmail.com"},"directories":{},"maintainers":[{"name":"apr144","email":"alexpreynolds@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dbscan_1.1.1_1740007957506_0.3788190436993084"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-19T23:32:37.394Z","1.1.1":"2025-02-19T23:32:37.675Z","modified":"2025-02-19T23:32:37.949Z"},"maintainers":[{"name":"apr144","email":"alexpreynolds@gmail.com"}],"description":"Customizable DBSCAN clustering for arbitrary datasets","homepage":"https://github.com/cdxOo/dbscan#readme","keywords":["cluster","clustering","DBSCAN","density","density-based-clustering","statistics"],"repository":{"type":"git","url":"git+https://github.com/alexpreynolds/dbscan.git"},"author":{"name":"Jan Schwalbe"},"bugs":{"url":"https://github.com/cdxOo/dbscan/issues"},"license":"MIT","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// => {\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) => Math.abs(a.foo - b.foo)\n});\n// => {\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) => ( /*...*/ ),\n                  // Custom function to compare calculated\n                  // distance and epsilon. Must return true/false.\n                  // Default is (dist, e) => (dist < e)\n    distanceFunction: (a, b) => ( /*...*/ ),\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) => 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","readmeFilename":"README.md"}