{"_id":"@ahebrank/affinity-propagation","_rev":"1-99584f7c7f268585dcd612c6284d2e74","name":"@ahebrank/affinity-propagation","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.2":{"name":"@ahebrank/affinity-propagation","version":"0.0.2","description":"Affinity propagation clustering (Frey & Dueck, Science 2007)","repository":{"type":"git","url":"git+https://github.com/juhis/affinity-propagation.git"},"main":"src/affinityPropagation.js","scripts":{"test":"node_modules/mocha/bin/mocha"},"keywords":["clustering","affinity","propagation"],"author":{"name":"Juha Karjalainen"},"devDependencies":{"async":"^1.5.0","mocha":"^8.1.3","should":"^7.1.1","split":"^1.0.0"},"dependencies":{"lodash":"^4.17.19"},"gitHead":"e3873fd4875d305c702c00b6b09368004aeb0ee5","bugs":{"url":"https://github.com/juhis/affinity-propagation/issues"},"homepage":"https://github.com/juhis/affinity-propagation#readme","_id":"@ahebrank/affinity-propagation@0.0.2","_nodeVersion":"14.8.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-7vuMnC5Q5b/1AYwZaWB7xwiS6mv0jsmz6lLq4ZoOcYaB1B/8UQU1HlJw9PqT5zAC2XJim9UOMZM+iwbtF+PC/g==","shasum":"4e6d47bcd6fce67d2f1acbc4038c5c1dcaf490f6","tarball":"https://registry.npmjs.org/@ahebrank/affinity-propagation/-/affinity-propagation-0.0.2.tgz","fileCount":12,"unpackedSize":500467,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfURycCRA9TVsSAnZWagAA8uYQAIzlzdzATlJyOkFPUzeI\nn+9YeG0KrG8Wu/6gs6hJEfgS5vqjQu9+VVnuEuN6gsziooaIn13M3RqNPtKc\nJT+EjkpMWglpK/t0EF6RNW9RGsjuE4paoZ/KGWLc7unYW37CN5zSz/BbSZ4C\nUi8FcWRFHrW6p96Xj4CFbuSBlhzMAYPCZb9sKGKhzeoXgwmyS9RQKj8Wlidj\n3sRlihwKKlyG7SN7RHZLVJbKRkV9T0yZCAohJ98yl3p4fn0Vi1nIw8Vxww2P\nhgqzgtzEHYRz/APBTcd2UCZwF2/TZJVAUisvoeDZ8NPA/nX2HLD0YCo/gat9\nznz0vdcZr19IP43Nl+ZQ3HYgIbqrPLZ9THXMcGa9JMr1nDogdZDhwBYAroqj\nl+N47N5xW4msSAMNFsqUkRMixEUGfu31dV9gRfat9wFypU7K0rmUXGXkfNoh\n6CogT+HLeL3Q1+EpIvUmuzigC7ovxBNNZ4DPvnJLJe4JwHTbOGRixfGOt4r0\nVrclj1MzewM/ygsPhs0FL1wDz9yY5L4+BLyVGMeugWVAp99VAN8/HYFx/56D\nlJqLBHJHW7zD2mxgcCsEwGXMBNDXnQGlF5d8td9PFx2ULY50f7ITyHqA40ME\n0nduMrn0FJC2e0vBzuQhsc9hOjaTDms0+OKfrRZUmOQ7e5eRzINMCFGzxSqO\nZM3V\r\n=z7As\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzTORyeIf0pVH8raG3yCAfJ4reELCbnCEG0kQ4/N2eZwIgAh2tcBbpCKzYB23r5jBiVDFTVJq3y7i2tSMDluiWcLI="}]},"maintainers":[{"name":"ahebrank","email":"ahebrank@gmail.com"}],"_npmUser":{"name":"ahebrank","email":"ahebrank@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/affinity-propagation_0.0.2_1599151260460_0.0330977188128978"},"_hasShrinkwrap":false}},"time":{"created":"2020-09-03T16:41:00.427Z","0.0.2":"2020-09-03T16:41:00.637Z","modified":"2022-04-04T12:12:12.115Z"},"maintainers":[{"name":"ahebrank","email":"ahebrank@gmail.com"}],"description":"Affinity propagation clustering (Frey & Dueck, Science 2007)","homepage":"https://github.com/juhis/affinity-propagation#readme","keywords":["clustering","affinity","propagation"],"repository":{"type":"git","url":"git+https://github.com/juhis/affinity-propagation.git"},"author":{"name":"Juha Karjalainen"},"bugs":{"url":"https://github.com/juhis/affinity-propagation/issues"},"readme":"# affinity-propagation\n\nAffinity propagation is a clustering method developed by Brendan J. Frey and Delbert Dueck. This is a Javascript implementation based on and tested against their [original Matlab implementation](http://www.psi.toronto.edu/affinitypropagation/software/apcluster.m).\n\n[Frey & Dueck: Clustering by Passing Messages Between Data Points, Science 2007](http://www.psi.toronto.edu/affinitypropagation/FreyDueckScience07.pdf)\n\n## Installation\n\naffinity-propagation is available in npm:\n\n```\n$ npm install affinity-propagation\n```\n\n## Usage\n\n``` JavaScript\nvar apclust = require('affinity-propagation')\n\n// input is a two-dimensional similarity matrix, doesn't have to be symmetric\nvar data = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]\n\n// basic usage\nvar result = apclust.getClusters(data)\nconsole.log(result)\n\n// result.exemplars is an array of indices of data points that are cluster exemplars\n// result.clusters is an array indicating which cluster each data point belongs to\n\n// 'preference', 'damping', 'maxIter' and 'convIter' options are available\n//\n// 'preference' is the inital preference of each data point being a cluster exemplar\n// it can be 'median' (data median, default), 'min' (data minimum), or any number\n//\n// 'damping' is the damping factor between iterations (default: 0.8)\n//\n// 'maxIter' is the maximum number of iterations to run\n//\n// 'convIter' is the number of iterations after which the clustering stops if it has converged\n//\nresult = apclust.getClusters(data, {preference: 'min', damping: 0.6})\nconsole.log(result)\n```\n\n## Testing\n\n```\n$ npm install\n$ npm test\n```\n","readmeFilename":"README.md"}