{"_id":"ml-distance","_rev":"37-3277507bb60cbc480dc98b38db1590c5","name":"ml-distance","dist-tags":{"latest":"5.0.0"},"versions":{"1.0.0":{"name":"ml-distance","version":"1.0.0","keywords":["distance","similarity","metric","vector","data","mining","datamining","machine","learning"],"license":"MIT","_id":"ml-distance@1.0.0","maintainers":[{"name":"targos","email":"targos@live.com"}],"contributors":[{"name":"Miguel Angel Asencio Hurtado"},{"name":"Michaël Zasso"}],"homepage":"https://github.com/mljs/distance","bugs":{"url":"https://github.com/mljs/distance/issues"},"dist":{"shasum":"bccad4c55ecdac667796a88fc1baf7ceb40b2e9d","tarball":"https://registry.npmjs.org/ml-distance/-/ml-distance-1.0.0.tgz","integrity":"sha512-ssNp1RTv/UE67sYc6/mCRXf1Uxz4HPrF11lpbL2u8/KGVmp7BiaZgpuCXTk7UpoY0Gq5AWYjaB8G1uoaYlVWEw==","signatures":[{"sig":"MEUCIGEK/9o15n882HxZ7+15tmcvv+nWvZGafwlmeJQlNFY1AiEAhAoj+HBF8mVNG41KclCAeFxexe3D+oF4AOdqgk9ZFmM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"src/index.js","_from":".","_shasum":"bccad4c55ecdac667796a88fc1baf7ceb40b2e9d","gitHead":"5684b91489bdb866bbc99d4155e9864fa94200e4","scripts":{"test":"mocha --require should-approximately-deep --reporter mocha-better-spec-reporter --recursive"},"_npmUser":{"name":"targos","email":"targos@live.com"},"repository":{"url":"https://github.com/mljs/distance","type":"git"},"_npmVersion":"2.0.0-beta.2","description":"Distance and similarity functions to compare vectors","directories":{"lib":"src","test":"test"},"devDependencies":{"mocha":"latest","should":"latest","mocha-better-spec-reporter":"latest"}},"1.0.1":{"name":"ml-distance","version":"1.0.1","keywords":["distance","similarity","metric","vector","data","mining","datamining","machine","learning"],"author":"","license":"MIT","_id":"ml-distance@1.0.1","maintainers":[{"name":"targos","email":"targos@live.com"},{"name":"maasencioh","email":"maasencioh@gmail.com"}],"homepage":"https://github.com/mljs/distance","bugs":{"url":"https://github.com/mljs/distance/issues"},"dist":{"shasum":"5c2f1b0b5feb0df0837429aca8f1450ddd96d536","tarball":"https://registry.npmjs.org/ml-distance/-/ml-distance-1.0.1.tgz","integrity":"sha512-4LWJ19qs8v5qHPnxV6r3/7StL1MHM6w3fSpGiVqElpn4dTnHbVuuamVST4IM5TqNmZj4GSn0uCpX7JWxTVG2uw==","signatures":[{"sig":"MEUCIQC5khyexce271Ocrmz/crJVx9R2c/W9p82jLXEqkZBr8gIgbaYH7vRxhVGY6LKM8AVbivKk28OCJTYl36lmDAPy47o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"src/index.js","_from":".","_shasum":"5c2f1b0b5feb0df0837429aca8f1450ddd96d536","gitHead":"02f780540a2e2dc57d284092e71d0ccc0344498a","scripts":{"test":"mocha --require should --reporter mocha-better-spec-reporter --recursive"},"_npmUser":{"name":"maasencioh","email":"maasencioh@gmail.com"},"repository":{"url":"git+https://github.com/mljs/distance.git","type":"git"},"_npmVersion":"2.11.0","description":"Distance and similarity functions to compare vectors","directories":{"lib":"src","test":"test"},"_nodeVersion":"2.2.1","devDependencies":{"del":"^1.1.1","gulp":"^3.8.11","mocha":"latest","yargs":"^1.3.2","should":"latest","gulp-git":"^0.5.3","gulp-bump":"^0.1.11","gulp-size":"^1.1.0","browserify":"^8.1.3","gulp-header":"^1.2.2","gulp-rename":"^1.2.0","gulp-uglify":"^1.1.0","vinyl-buffer":"^1.0.0","gulp-sourcemaps":"^1.3.0","vinyl-source-stream":"^1.0.0","mocha-better-spec-reporter":"latest"}},"1.0.2":{"name":"ml-distance","version":"1.0.2","keywords":["distance","similarity","metric","vector","data","mining","datamining","machine","learning"],"author":"","license":"MIT","_id":"ml-distance@1.0.2","maintainers":[{"name":"targos","email":"targos@live.com"},{"name":"maasencioh","email":"maasencioh@gmail.com"}],"homepage":"https://github.com/mljs/distance","bugs":{"url":"https://github.com/mljs/distance/issues"},"dist":{"shasum":"8eb2dc9a5daf4e66c3213a1fac207de1c5e08b44","tarball":"https://registry.npmjs.org/ml-distance/-/ml-distance-1.0.2.tgz","integrity":"sha512-roLmmragjaPj2ZPHLoA48CkhPAUXBXMk23HDd194Yaw/qxFwvfi0bK5oNxbXakkkgrB596Y8swM4K7urldBgfw==","signatures":[{"sig":"MEYCIQDZejMGIdG2Eyn5tYxXRVK35z3Rt1YiQ4vcF7teW53o2QIhAPi5Nl58G33wsRPuQkVPG5WVy3bCy++KFcGvtvYODK9c","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"src/index.js","_from":".","_shasum":"8eb2dc9a5daf4e66c3213a1fac207de1c5e08b44","gitHead":"e440cb768fa87b0be23b0311f9cb176bac58ceab","scripts":{"test":"mocha --require should --reporter mocha-better-spec-reporter --recursive"},"_npmUser":{"name":"maasencioh","email":"maasencioh@gmail.com"},"repository":{"url":"git+https://github.com/mljs/distance.git","type":"git"},"_npmVersion":"2.11.0","description":"Distance and similarity functions to compare vectors","directories":{"lib":"src","test":"test"},"_nodeVersion":"2.2.1","devDependencies":{"del":"^1.1.1","gulp":"^3.8.11","mocha":"latest","yargs":"^1.3.2","should":"latest","gulp-git":"^0.5.3","gulp-bump":"^0.1.11","gulp-size":"^1.1.0","browserify":"^8.1.3","gulp-header":"^1.2.2","gulp-rename":"^1.2.0","gulp-uglify":"^1.1.0","vinyl-buffer":"^1.0.0","gulp-sourcemaps":"^1.3.0","vinyl-source-stream":"^1.0.0","mocha-better-spec-reporter":"latest"}},"2.0.0":{"name":"ml-distance","version":"2.0.0","keywords":["distance","similarity","metric","vector","data","mining","datamining","machine","learning"],"author":{"name":"Michaël Zasso"},"license":"MIT","_id":"ml-distance@2.0.0","maintainers":[{"name":"targos","email":"targos@live.com"},{"name":"maasencioh","email":"maasencioh@gmail.com"}],"contributors":[{"name":"Miguel Asencio"}],"homepage":"https://github.com/mljs/distance","bugs":{"url":"https://github.com/mljs/distance/issues"},"dist":{"shasum":"c6a0725e95de4e640ec0314fe80c31c68ea7093d","tarball":"https://registry.npmjs.org/ml-distance/-/ml-distance-2.0.0.tgz","integrity":"sha512-jZ8bWEg/7vriknE7ZmLbao5BarouXvhTPuhtiIOJviydegy2ktGf5YA93nKDVd4bE0lNJ8kdxhZZaABbuQ0EXA==","signatures":[{"sig":"MEUCIEcZ5EZ29PWg7hJz2VkC+up1pksf+qqHf39Co3PgsgWsAiEA3EyvnLYUpiFgXpE5XwCnWy7AApHy3CyUeKUMTt0Abbc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"src/index.js","_from":".","_shasum":"c6a0725e95de4e640ec0314fe80c31c68ea7093d","gitHead":"b372341349da653a3396f9b5c15382ed1fbc6d25","scripts":{"test":"mocha --require should --reporter mocha-better-spec-reporter --recursive"},"_npmUser":{"name":"maasencioh","email":"maasencioh@gmail.com"},"repository":{"url":"git+https://github.com/mljs/distance.git","type":"git"},"_npmVersion":"2.11.0","description":"Distance and similarity functions to compare vectors","directories":{"lib":"src","test":"test"},"_nodeVersion":"2.2.1","dependencies":{"ml-euclidean-distance":"^1.0.0"},"devDependencies":{"mocha":"^2.2.5","should":"^7.0.2","mocha-better-spec-reporter":"^2.1.1"}},"2.0.1":{"name":"ml-distance","version":"2.0.1","keywords":["distance","similarity","metric","vector","data","mining","datamining","machine","learning"],"author":{"name":"Michaël Zasso"},"license":"MIT","_id":"ml-distance@2.0.1","maintainers":[{"name":"targos","email":"targos@live.com"},{"name":"maasencioh","email":"maasencioh@gmail.com"}],"contributors":[{"name":"Miguel Asencio"}],"homepage":"https://github.com/mljs/distance","bugs":{"url":"https://github.com/mljs/distance/issues"},"dist":{"shasum":"0cb4ffcb66c365da501a05748a19460a0435c03c","tarball":"https://registry.npmjs.org/ml-distance/-/ml-distance-2.0.1.tgz","integrity":"sha512-GqYjowe2NGzqjZQA+CR+RbQtVTUncmD+dOSZGiiSZoHWd9H/QGDKU71DPczTw+ja+lgWG3jIOOJGxk+eQKxCFA==","signatures":[{"sig":"MEYCIQDCKQssPkW6FFzL2ZA7ej+tYo92g/nUBK5HFY0nMIi+agIhANwMznmFA3/BF4fkgHePCoYNvqSWPy7yF8keQYK+yubt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"src/index.js","_from":".","_shasum":"0cb4ffcb66c365da501a05748a19460a0435c03c","gitHead":"9d497cdab3356f9f695642fe255ccaf0274fd176","scripts":{"test":"mocha --require should --reporter mocha-better-spec-reporter --recursive"},"_npmUser":{"name":"maasencioh","email":"maasencioh@gmail.com"},"repository":{"url":"git+https://github.com/mljs/distance.git","type":"git"},"_npmVersion":"2.11.0","description":"Distance and similarity functions to compare vectors","directories":{"lib":"src","test":"test"},"_nodeVersion":"2.2.1","dependencies":{"ml-tree-similarity":"^0.0.0","ml-euclidean-distance":"^1.0.0"},"devDependencies":{"mocha":"^2.2.5","should":"^7.0.2","mocha-better-spec-reporter":"^2.1.1"}},"2.1.0":{"name":"ml-distance","version":"2.1.0","keywords":["distance","similarity","metric","vector","data","mining","datamining","machine","learning"],"author":{"name":"Michaël Zasso"},"license":"MIT","_id":"ml-distance@2.1.0","maintainers":[{"name":"targos","email":"targos@live.com"},{"name":"maasencioh","email":"maasencioh@gmail.com"},{"name":"cheminfo-bot","email":"admin@cheminfo.org"},{"name":"lpatiny","email":"lpatiny@gmail.com"}],"contributors":[{"name":"Miguel Asencio"}],"homepage":"https://github.com/mljs/distance","bugs":{"url":"https://github.com/mljs/distance/issues"},"dist":{"shasum":"03ded734cf880ffffee9c888d63b32d78fc4b893","tarball":"https://registry.npmjs.org/ml-distance/-/ml-distance-2.1.0.tgz","integrity":"sha512-HD6PY1DU/2qPBRdtTLUJfWf8RSElPGvq8PKUhhH/PtIZu1nAf849/vUYYqTf2h+qV7d+Fu1EA/vP0IfUVRcOfA==","signatures":[{"sig":"MEUCIGNsYQT617Hc1x3323cmLh3c2uGiKGEb+8ow+g75CF2IAiEA8hBFirMsfzY/QWzmz3yrbyDUEvxQ2babNHcOVFbBDkc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"src/index.js","_from":".","_shasum":"03ded734cf880ffffee9c888d63b32d78fc4b893","gitHead":"6d9fd814065b7dadd2aa6b80604655dc6c6d377c","scripts":{"test":"mocha --require should --reporter mocha-better-spec-reporter --recursive"},"_npmUser":{"name":"lpatiny","email":"lpatiny@gmail.com"},"repository":{"url":"git+https://github.com/mljs/distance.git","type":"git"},"_npmVersion":"2.13.0","description":"Distance and similarity functions to compare vectors","directories":{"lib":"src","test":"test"},"_nodeVersion":"2.4.0","dependencies":{"ml-stat":"^1.0.1","ml-tree-similarity":"^0.0.0","ml-euclidean-distance":"^1.0.0"},"devDependencies":{"mocha":"^2.2.5","should":"^7.0.2","mocha-better-spec-reporter":"^2.1.1"}},"2.1.1":{"name":"ml-distance","version":"2.1.1","keywords":["distance","similarity","metric","vector","data","mining","datamining","machine","learning"],"author":{"name":"Michaël Zasso"},"license":"MIT","_id":"ml-distance@2.1.1","maintainers":[{"name":"targos","email":"targos@live.com"},{"name":"maasencioh","email":"maasencioh@gmail.com"},{"name":"cheminfo-bot","email":"admin@cheminfo.org"},{"name":"lpatiny","email":"lpatiny@gmail.com"}],"contributors":[{"name":"Miguel Asencio"}],"homepage":"https://github.com/mljs/distance","bugs":{"url":"https://github.com/mljs/distance/issues"},"dist":{"shasum":"f6cc1f2970819cb42e68c68de363309ba3bd079f","tarball":"https://registry.npmjs.org/ml-distance/-/ml-distance-2.1.1.tgz","integrity":"sha512-fkJSN1u4gnosyCCz7nlYMc9lgPEfG1gpG5gvR3fwWs748F/FTok91R0hzWh5Mu8twnRfYqMAxl9J4PTZk1iLzg==","signatures":[{"sig":"MEUCIHfOgCluow5yFzz2yBrYeG3EXWCjewuD9S+iXRwbemxLAiEAywfVAD020amTZRRjxD1OFD0PLdZRgOZRcoWLHeQA2uQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"src/index.js","_from":".","_shasum":"f6cc1f2970819cb42e68c68de363309ba3bd079f","gitHead":"b344cb49460cfa7a4ef3761a81f68b912b4955e0","scripts":{"test":"mocha --require should --reporter mocha-better-spec-reporter --recursive"},"_npmUser":{"name":"targos","email":"targos@live.com"},"repository":{"url":"git+https://github.com/mljs/distance.git","type":"git"},"_npmVersion":"3.10.5","description":"Distance and similarity functions to compare vectors","directories":{"lib":"src","test":"test"},"_nodeVersion":"6.3.1","dependencies":{"ml-stat":"^1.0.1","ml-tree-similarity":"^0.0.0","ml-distance-euclidean":"^1.0.0"},"devDependencies":{"mocha":"^3.0.0","should":"^10.0.0","mocha-better-spec-reporter":"^3.0.2"},"_npmOperationalInternal":{"tmp":"tmp/ml-distance-2.1.1.tgz_1470206210232_0.28762899641878903","host":"packages-16-east.internal.npmjs.com"}},"3.0.0":{"name":"ml-distance","version":"3.0.0","keywords":["distance","similarity","metric","vector","data","mining","datamining","machine","learning"],"author":{"name":"Michaël Zasso"},"license":"MIT","_id":"ml-distance@3.0.0","maintainers":[{"name":"andcastillo","email":"andcastillo@gmail.com"},{"name":"cheminfo-bot","email":"admin@cheminfo.org"},{"name":"jeffersonh44","email":"swrt_9950@hotmail.com"},{"name":"lpatiny","email":"lpatiny@gmail.com"},{"name":"maasencioh","email":"maasencioh@gmail.com"},{"name":"ml-bot","email":"admin@cheminfo.org"},{"name":"stropitek","email":"kostro.d@gmail.com"},{"name":"targos","email":"targos@live.com"}],"contributors":[{"name":"Miguel Asencio"}],"homepage":"https://github.com/mljs/distance","bugs":{"url":"https://github.com/mljs/distance/issues"},"dist":{"shasum":"0e49c525480b21c28a3fbcdc4577f063341dfecf","tarball":"https://registry.npmjs.org/ml-distance/-/ml-distance-3.0.0.tgz","fileCount":59,"integrity":"sha512-sRDuFVgZp2jTRkI/Y3urDXNjFG+rkrZ70ic8gt8KxOp+eNHDaDJolM5AxPX9G2FQMuIk3AUBdlDU1yhhXcf4+A==","signatures":[{"sig":"MEUCIGYIxQSkarmbsCn6tdYG7yKzqfeRg1g3MbIrCMx2gL20AiEAp+W/SYpAebSqTslLzX5tTfYTMmp+i732pTmflKCGlJY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":37294,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdF+XLCRA9TVsSAnZWagAAdBwP/2pRO84DU28yhsuLSlUu\nSzON6j/kyC/jYqOgWThISSgSl2VyRqN8S9tSipBvv5gQEE/UvDHfMcEjgGDl\n1A2mSDImk1S0KZRF1QhkZKBAp8cx0olyRFX7OBCdYpBespKnoL8lXUub119S\nSLcfM/8T4HT8vwU6sHZKWDFWZgKCxgnJ7VSucVaWmkVRrGGZEsIGLmeZsDik\n6mqCslKnQBrF81tCDZD5C0vQxHhcc0ujA/UkTdAEC1lofOvp3zFGjJiwi19p\noFRxgelKU3ipVGtj7i2h4FuVOiXs/nDNO78iYBhBZ2JD6+vIAdMZm2YDeZMP\n5b4v4OT246Y5yEq2/YFRz5jVLECfE8ipkfEGRW+xUxhDy94p+SXfCXVuBIRn\ndugUlAtxgp20NWG3yesNS0yXUBAcOkAq3d3KXGbrE80drsYzurVQGY44YTXa\nfh00HoXsahk3mQqnCUuptc3rGPqv9xsvGWq1Hi0Oj9g0yqozkBiCDiXZL5/p\nA+jbSPoBXODRK4aLdsFw/ZXztcLhS7c99nFLl1rBmzHUn0MVV0w3Iiww24z8\nL7fJFNF2nzv7Pg+i6VICXFFxGXX3E8pBoPnWhAvyQqn0SONn4vLWSaPvnSfS\nA0sv4V3RI/8/6FZMI3GinXM/Vj6dcN05cMu5piv/qE8AkS0LSGiS8guypfLa\nilsO\r\n=ErqM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","module":"src/index.js","gitHead":"22b7af1df536ea32b06f3e5ed3f7fa3523f67ee7","scripts":{"test":"npm run test-coverage && npm run eslint","eslint":"eslint src","compile":"rollup -c","test-only":"jest","eslint-fix":"npm run eslint -- --fix","test-coverage":"jest --coverage","prepublishOnly":"npm run compile"},"_npmUser":{"name":"targos","email":"targos+npm@protonmail.com"},"repository":{"url":"git+https://github.com/mljs/distance.git","type":"git"},"_npmVersion":"6.9.0","description":"Distance and similarity functions to compare vectors","directories":{},"_nodeVersion":"12.5.0","dependencies":{"ml-array-mean":"^1.1.1","ml-tree-similarity":"^1.0.0","ml-distance-euclidean":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^24.8.0","eslint":"^6.0.1","rollup":"^1.16.3","eslint-plugin-jest":"^22.7.1","eslint-plugin-import":"^2.18.0","eslint-config-cheminfo":"^1.20.1","@babel/plugin-transform-modules-commonjs":"^7.4.4"},"_npmOperationalInternal":{"tmp":"tmp/ml-distance_3.0.0_1561847242938_0.2663498431382765","host":"s3://npm-registry-packages"}},"4.0.0":{"name":"ml-distance","version":"4.0.0","keywords":["distance","similarity","metric","vector","data","mining","datamining","machine","learning"],"author":{"name":"Michaël Zasso"},"license":"MIT","_id":"ml-distance@4.0.0","maintainers":[{"name":"stropitek","email":"kostro.d@gmail.com"},{"name":"targos","email":"targos+npm@protonmail.com"},{"name":"lpatiny","email":"luc@patiny.com"},{"name":"mljs-bot","email":"bot+npm-mljs@zakodium.com"},{"name":"cheminfo-bot","email":"bot+npm-cheminfo@zakodium.com"},{"name":"maasencioh","email":"maasencioh@gmail.com"},{"name":"jeffersonh44","email":"jeffersonh44@gmail.com"},{"name":"andcastillo","email":"andcastillo@gmail.com"}],"contributors":[{"name":"Miguel Asencio"}],"homepage":"https://github.com/mljs/distance","bugs":{"url":"https://github.com/mljs/distance/issues"},"dist":{"shasum":"197c272abea03f13e1746e59a35be4491566bfdc","tarball":"https://registry.npmjs.org/ml-distance/-/ml-distance-4.0.0.tgz","fileCount":480,"integrity":"sha512-zj7+UGZpHk3uL7n79XTfGNUjIGnhLn8xVvrxYvBHvXFxo3jq1q+/UjP311hZxnLVhbxbXCjUniThX8gozjacYA==","signatures":[{"sig":"MEUCIANYV1oGTp+d6Gx1fhBphKpetEBQJZ1SknsDTdYPbYzHAiEAogdYyXD5RJSP9vY/zRDiB2VQiuRd4RKUg8edT3EHfkI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245886,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjuFWrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmodfA/6A/XafK0q670a6cGRpw1Fo4Bd7o+onMBy98sZDgq8u4nnc8NC\r\njT3qR9lvFT86549wlRipU2jBOO7vntusGqK+F/XxI4uDSoaAQsFB304ugvnA\r\nQaUv8+F3rnPTwd81hMVYe2J7A7lEjz9VYhJlp8qMJl2zNk/Pt8/rlNHXK8/R\r\nmpIc4xAlnsY3iaj4YZgohHf5kP50vnu86JFLvGpvdi0s+5JDc/XcgwE2ar/1\r\nQv1NOmEAf27oMWOWmPwAkAVzuChmetcBb7dT+eKtDvvu8FO56yUUKhx404y/\r\nd7Tw18D9S2NEXIELiqHAltZUV0fFprUCN55KeBWWEOy07eKfKhFkLzfDjgST\r\nCgnfiS11drR1/rXIT0XnwJWiLAJ4zVnS4vIUDJx4t/F/X/eUfH+L7SaQ269d\r\nNq17660NAYGvTcvHni27Da+SHx1soq9WtBUd0Bv5CL2j2i/Dja4jpWEwAdQ6\r\neTrT/svuQRNOFyG/5OxeuALLHXySLv34TpuIZCDJYh/pn66C+hjnWLdFUlFf\r\nPbdCNv7q+7u8zAqeF0Dd5umWppru9f4+HoG0QPk69iyHxhY0Q9YnKj1xQBfU\r\nLfeO35D0c24vw01HM5eTsaUGZCieEACXQB3P82mcEAQKQvwMjWe/ATyY6uY/\r\nMHlFipJ+c40ipYCvSiEwIkHX5qwh9YN5NvA=\r\n=3rTy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"./lib/index.d.ts","module":"./lib-esm/index.js","gitHead":"cbfe008c34e8334ffb4823a367926ca63060494f","scripts":{"tsc":"npm run clean && npm run tsc-cjs && npm run tsc-esm","test":"npm run test-coverage && npm run eslint && npm run check-types","clean":"rimraf lib lib-esm","eslint":"eslint src","prepack":"npm run tsc","tsc-cjs":"tsc --project tsconfig.cjs.json","tsc-esm":"tsc --project tsconfig.esm.json","prettier":"prettier --check src","test-only":"jest","eslint-fix":"npm run eslint -- --fix","check-types":"tsc --noEmit","test-coverage":"jest --coverage","prettier-write":"prettier --write src"},"_npmUser":{"name":"mljs-bot","email":"bot+npm-mljs@zakodium.com"},"repository":{"url":"git+https://github.com/mljs/distance.git","type":"git"},"_npmVersion":"8.19.2","description":"Distance and similarity functions to compare vectors","directories":{},"_nodeVersion":"16.18.1","dependencies":{"ml-array-mean":"^1.1.6","ml-tree-similarity":"^1.0.0","ml-distance-euclidean":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"esm":"^3.2.25","jest":"^29.3.1","eslint":"^8.30.0","rimraf":"^3.0.2","prettier":"^2.8.1","typescript":"^4.9.4","@types/jest":"^29.2.4","cheminfo-types":"^1.4.0","@babel/preset-typescript":"^7.18.6","eslint-config-cheminfo-typescript":"^11.2.2","@babel/plugin-transform-modules-commonjs":"^7.20.7"},"_npmOperationalInternal":{"tmp":"tmp/ml-distance_4.0.0_1673024939053_0.2562466777411747","host":"s3://npm-registry-packages"}},"4.0.1":{"name":"ml-distance","version":"4.0.1","keywords":["distance","similarity","metric","vector","data","mining","datamining","machine","learning"],"author":{"name":"Michaël Zasso"},"license":"MIT","_id":"ml-distance@4.0.1","maintainers":[{"name":"stropitek","email":"kostro.d@gmail.com"},{"name":"targos","email":"targos+npm@protonmail.com"},{"name":"lpatiny","email":"luc@patiny.com"},{"name":"mljs-bot","email":"bot+npm-mljs@zakodium.com"},{"name":"cheminfo-bot","email":"bot+npm-cheminfo@zakodium.com"},{"name":"maasencioh","email":"maasencioh@gmail.com"},{"name":"jeffersonh44","email":"jeffersonh44@gmail.com"},{"name":"andcastillo","email":"andcastillo@gmail.com"}],"contributors":[{"name":"Miguel Asencio"}],"homepage":"https://github.com/mljs/distance","bugs":{"url":"https://github.com/mljs/distance/issues"},"dist":{"shasum":"4741d17a1735888c5388823762271dfe604bd019","tarball":"https://registry.npmjs.org/ml-distance/-/ml-distance-4.0.1.tgz","fileCount":480,"integrity":"sha512-feZ5ziXs01zhyFUUUeZV5hwc0f5JW0Sh0ckU1koZe/wdVkJdGxcP06KNQuF0WBTj8FttQUzcvQcpcrOp/XrlEw==","signatures":[{"sig":"MEQCIF+ldMOv7rkIwt8r6glnsJMTDS9g9WZDd3v1BQHqImZxAiB6fvnxUYCtClq8sLG8Q+waLUypUlqDwNazO96VL1uFmA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":247350},"main":"lib/index.js","types":"./lib/index.d.ts","module":"./lib-esm/index.js","gitHead":"6c01cb063ae50859cabc80ca505002162a003b77","scripts":{"tsc":"npm run clean && npm run tsc-cjs && npm run tsc-esm","test":"npm run test-coverage && npm run eslint && npm run check-types","clean":"rimraf lib lib-esm","eslint":"eslint src","prepack":"npm run tsc","tsc-cjs":"tsc --project tsconfig.cjs.json","tsc-esm":"tsc --project tsconfig.esm.json","prettier":"prettier --check src","test-only":"jest","eslint-fix":"npm run eslint -- --fix","check-types":"tsc --noEmit","test-coverage":"jest --coverage","prettier-write":"prettier --write src"},"_npmUser":{"name":"mljs-bot","email":"bot+npm-mljs@zakodium.com"},"repository":{"url":"git+https://github.com/mljs/distance.git","type":"git"},"_npmVersion":"8.19.4","description":"Distance and similarity functions to compare vectors","directories":{},"_nodeVersion":"16.20.0","dependencies":{"ml-array-mean":"^1.1.6","ml-tree-similarity":"^1.0.0","ml-distance-euclidean":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"esm":"^3.2.25","jest":"^29.3.1","eslint":"^8.30.0","rimraf":"^3.0.2","prettier":"^2.8.1","typescript":"^4.9.4","@types/jest":"^29.2.4","cheminfo-types":"^1.4.0","@babel/preset-typescript":"^7.18.6","eslint-config-cheminfo-typescript":"^11.2.2","@babel/plugin-transform-modules-commonjs":"^7.20.7"},"_npmOperationalInternal":{"tmp":"tmp/ml-distance_4.0.1_1685613413754_0.4809814322442656","host":"s3://npm-registry-packages"}},"4.1.0":{"name":"ml-distance","version":"4.1.0","keywords":["distance","similarity","metric","vector","data","mining","datamining","machine","learning"],"author":{"name":"Michaël Zasso"},"license":"MIT","_id":"ml-distance@4.1.0","maintainers":[{"name":"stropitek","email":"kostro.d@gmail.com"},{"name":"targos","email":"npm@secmail.targos.dev"},{"name":"lpatiny","email":"luc@patiny.com"},{"name":"mljs-bot","email":"bot+npm-mljs@zakodium.com"},{"name":"cheminfo-bot","email":"bot+npm-cheminfo@zakodium.com"},{"name":"maasencioh","email":"maasencioh@gmail.com"},{"name":"jeffersonh44","email":"jeffersonh44@gmail.com"},{"name":"andcastillo","email":"andcastillo@gmail.com"}],"contributors":[{"name":"Miguel Asencio"}],"homepage":"https://github.com/mljs/distance","bugs":{"url":"https://github.com/mljs/distance/issues"},"dist":{"shasum":"96b3c33e515838b23acdd9a698eb3e7a8d4e1033","tarball":"https://registry.npmjs.org/ml-distance/-/ml-distance-4.1.0.tgz","fileCount":268,"integrity":"sha512-qCGHqSbuNV6S3ysp7ECzPGICm9I3djG8F0Z5IbOYATd2K3C9oilGckyVms2BFGY4T8BUIgNrmerv8KnbWXLjNg==","signatures":[{"sig":"MEYCIQCXmhgzz//3m2EifYvJN4+ij1GOb+U5r7cGg6ASOlev8wIhAKgOrMhw2HtngelWei0UQzp/dtSVoQkN11cXZwdAeLAG","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":133632},"type":"module","exports":{".":"./lib/index.js"},"gitHead":"6cad1ffabc296ecea5b4c2defcbf5eaa24f8c0e3","scripts":{"tsc":"npm run clean && npm run tsc-build","test":"npm run test-only && npm run check-types && npm run eslint && npm run prettier","clean":"rimraf coverage lib","eslint":"eslint .","prepack":"npm run tsc","prettier":"prettier --check .","test-only":"vitest run --coverage","tsc-build":"tsc --project tsconfig.build.json","eslint-fix":"eslint . --fix","check-types":"tsc --noEmit","prettier-write":"prettier --write ."},"_npmUser":{"name":"mljs-bot","email":"bot+npm-mljs@zakodium.com"},"repository":{"url":"git+https://github.com/mljs/distance.git","type":"git"},"_npmVersion":"11.16.0","description":"Distance and similarity functions to compare vectors","directories":{},"_nodeVersion":"24.18.0","dependencies":{"cheminfo-types":"^1.15.0","ml-tree-similarity":"^1.0.0","ml-distance-euclidean":"^3.0.1"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.39.5","rimraf":"^6.1.3","vitest":"^4.1.10","prettier":"^3.9.6","benchmark":"^2.1.4","typescript":"^6.0.3","@types/node":"^26.1.1","@zakodium/tsconfig":"^1.0.5","@vitest/coverage-v8":"^4.1.10","eslint-config-cheminfo-typescript":"^22.1.0"},"_npmOperationalInternal":{"tmp":"tmp/ml-distance_4.1.0_1785414267188_0.8198345912987846","host":"s3://npm-registry-packages-npm-production"}},"5.0.0":{"name":"ml-distance","version":"5.0.0","description":"Distance and similarity functions to compare vectors","type":"module","exports":{".":"./lib/index.js"},"scripts":{"check-types":"tsc --noEmit","clean":"rimraf coverage lib","eslint":"eslint .","eslint-fix":"eslint . --fix","prepack":"npm run tsc","prettier":"prettier --check .","prettier-write":"prettier --write .","test":"npm run test-only && npm run check-types && npm run eslint && npm run prettier","test-only":"vitest run --coverage","tsc":"npm run clean && npm run tsc-build","tsc-build":"tsc --project tsconfig.build.json"},"repository":{"type":"git","url":"git+https://github.com/mljs/distance.git"},"keywords":["distance","similarity","metric","vector","data","mining","datamining","machine","learning"],"author":{"name":"Michaël Zasso"},"contributors":[{"name":"Miguel Asencio"}],"license":"MIT","bugs":{"url":"https://github.com/mljs/distance/issues"},"homepage":"https://github.com/mljs/distance","dependencies":{"cheminfo-types":"^1.15.0","ml-distance-euclidean":"^3.0.1","ml-tree-similarity":"^1.0.0"},"devDependencies":{"@types/node":"^26.1.1","@vitest/coverage-v8":"^4.1.10","@zakodium/tsconfig":"^1.0.5","benchmark":"^2.1.4","eslint":"^9.39.5","eslint-config-cheminfo-typescript":"^22.1.0","ml-xsadd":"^3.0.1","prettier":"^3.9.6","rimraf":"^6.1.3","typescript":"^6.0.3","vitest":"^4.1.10"},"gitHead":"c5f1643257e4c4c7dac03ebbdff54adb8d493ae6","_id":"ml-distance@5.0.0","_nodeVersion":"24.20.0","_npmVersion":"11.19.0","dist":{"integrity":"sha512-wCGhmaLw9Tb0OgrKMZF3mjUzVKA2qCyC2GtLkOXhJZxHl9QQJWaQxruspg+56CTd0kytNXIeo6RAecp3OoY5ow==","shasum":"8f34d700a510c7dfd492aa448fd5ce7f48cd5729","tarball":"https://registry.npmjs.org/ml-distance/-/ml-distance-5.0.0.tgz","fileCount":268,"unpackedSize":134431,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIESYpXG2vUlZpRy3VD/GknWhkBhStokttKEPXnC661emAiEA8g4AvkQIJ+ZNPgNG3ubAIgNg1Cmr7BY8IuUf5ybmMCw="}]},"_npmUser":{"name":"mljs-bot","email":"bot+npm-mljs@zakodium.com"},"directories":{},"maintainers":[{"name":"stropitek","email":"kostro.d@gmail.com"},{"name":"targos","email":"npm@secmail.targos.dev"},{"name":"lpatiny","email":"luc@patiny.com"},{"name":"mljs-bot","email":"bot+npm-mljs@zakodium.com"},{"name":"cheminfo-bot","email":"bot+npm-cheminfo@zakodium.com"},{"name":"maasencioh","email":"maasencioh@gmail.com"},{"name":"jeffersonh44","email":"jeffersonh44@gmail.com"},{"name":"andcastillo","email":"andcastillo@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ml-distance_5.0.0_1788865204906_0.8754615388503368"},"_hasShrinkwrap":false}},"time":{"created":"2014-11-18T06:40:55.442Z","modified":"2026-09-08T11:00:05.252Z","1.0.0":"2014-11-18T06:40:55.442Z","1.0.1":"2015-06-23T08:33:45.820Z","1.0.2":"2015-06-23T11:52:34.300Z","1.1.0":"2015-07-15T09:33:35.687Z","2.0.0":"2015-07-15T09:38:15.399Z","2.0.1":"2015-07-15T12:16:29.562Z","2.1.0":"2015-08-20T12:07:49.441Z","2.1.1":"2016-08-03T06:36:51.567Z","3.0.0":"2019-06-29T22:27:23.047Z","4.0.0":"2023-01-06T17:08:59.212Z","4.0.1":"2023-06-01T09:56:54.011Z","4.1.0":"2026-07-30T12:24:27.341Z","5.0.0":"2026-09-08T11:00:05.047Z"},"bugs":{"url":"https://github.com/mljs/distance/issues"},"author":{"name":"Michaël Zasso"},"license":"MIT","homepage":"https://github.com/mljs/distance","keywords":["distance","similarity","metric","vector","data","mining","datamining","machine","learning"],"repository":{"type":"git","url":"git+https://github.com/mljs/distance.git"},"description":"Distance and similarity functions to compare vectors","contributors":[{"name":"Miguel Asencio"}],"maintainers":[{"name":"stropitek","email":"kostro.d@gmail.com"},{"name":"targos","email":"npm@secmail.targos.dev"},{"name":"lpatiny","email":"luc@patiny.com"},{"name":"mljs-bot","email":"bot+npm-mljs@zakodium.com"},{"name":"cheminfo-bot","email":"bot+npm-cheminfo@zakodium.com"},{"name":"maasencioh","email":"maasencioh@gmail.com"},{"name":"jeffersonh44","email":"jeffersonh44@gmail.com"},{"name":"andcastillo","email":"andcastillo@gmail.com"}],"readme":"# ml-distance\n\n<h3 align=\"center\">\n\n  <a href=\"https://www.zakodium.com\">\n   <img src=\"https://www.zakodium.com/brand/zakodium-logo-white.svg\" width=\"50\" alt=\"Zakodium logo\" />\n  </a>\n\n  <p>\n    Maintained by <a href=\"https://www.zakodium.com\">Zakodium</a>\n  </p>\n\n[![NPM version][npm-image]][npm-url]\n[![Node.js CI](https://github.com/mljs/distance/actions/workflows/nodejs.yml/badge.svg)](https://github.com/mljs/distance/actions/workflows/nodejs.yml)\n[![Test coverage][codecov-image]][codecov-url]\n[![npm download][download-image]][download-url]\n\n</h3>\n\nDistance functions to compare vectors.\n\n## Installation\n\n`$ npm i ml-distance`\n\nThis package is ESM-only. CommonJS consumers need Node.js >= 20.19, >= 22.12, or\nany 24.x or later to `require()` it, or should migrate to `import`.\n\n## Usage\n\n```js\nimport { distance, similarity } from 'ml-distance';\n\nconst p = [0, 1, 2, 3, 4];\nconst q = [4, 3, 2, 1, 0];\n\ndistance.euclidean(p, q); // 6.324555320336759\ndistance.manhattan(p, q); // 12\nsimilarity.cosine(p, q); // 0.3333333333333333\n```\n\n## Methods\n\n### Distances\n\n- `euclidean(p, q)`\n\nReturns the [euclidean distance](http://en.wikipedia.org/wiki/Euclidean_distance#n_dimensions) between vectors p and q\n\n$d(p,q)=\\sqrt{\\sum\\limits_{i=1}^{n}(p_i-q_i)^2}$\n\n- `manhattan(p, q)`\n\nReturns the [city block distance](http://en.wikipedia.org/wiki/Taxicab_geometry) between vectors p and q\n\n$d(p,q)=\\sum\\limits_{i=1}^{n}{\\left|p_i-q_i\\right|}$\n\n- `minkowski(p, q, d)`\n\nReturns the [Minkowski distance](http://en.wikipedia.org/wiki/Minkowski_distance) between vectors p and q for order d\n\n- `chebyshev(p, q)`\n\nReturns the [Chebyshev distance](http://en.wikipedia.org/wiki/Chebyshev_distance) between vectors p and q\n\n$d(p,q)=\\max\\limits_i(|p_i-q_i|)$\n\n- `sorensen(p, q)`\n\nReturns the [Sørensen distance](http://en.wikipedia.org/wiki/S%C3%B8rensen%E2%80%93Dice_coefficient) between vectors p and q\n\n$d(p,q)=\\frac{\\sum\\limits_{i=1}^{n}{\\left|p_i-q_i\\right|}}{\\sum\\limits_{i=1}^{n}{p_i+q_i}}$\n\n- `gower(p, q)`\n\nReturns the [Gower distance](https://stat.ethz.ch/education/semesters/ss2012/ams/slides/v4.2.pdf) between vectors p and q\n\n$d(p,q)=\\frac{\\sum\\limits_{i=1}^{n}{\\left|p_i-q_i\\right|}}{n}$\n\n- `soergel(p, q)`\n\nReturns the [Soergel distance](http://www.orgchm.bas.bg/~vmonev/SimSearch.pdf) between vectors p and q\n\n$d(p,q)=\\frac{\\sum\\limits_{i=1}^{n}{\\left|p_i-q_i\\right|}}{\\sum\\limits_{i=1}^{n}{max(p_i,q_i)}}$\n\n- `kulczynski(p, q)`\n\nReturns the [Kulczynski distance](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$d(p,q)=\\frac{\\sum\\limits_{i=1}^{n}{\\left|p_i-q_i\\right|}}{\\sum\\limits_{i=1}^{n}{min(p_i,q_i)}}$\n\n- `canberra(p, q)`\n\nReturns the [Canberra distance](http://en.wikipedia.org/wiki/Canberra_distance) between vectors p and q\n\n$d(p,q)=\\sum\\limits_{i=1}^{n}\\frac{\\left|{p_i-q_i}\\right|}{p_i+q_i}$\n\n- `lorentzian(p, q)`\n\nReturns the [Lorentzian distance](https://stat.ethz.ch/education/semesters/ss2012/ams/slides/v4.2.pdf) between vectors p and q\n\n$d(p,q)=\\sum\\limits_{i=1}^{n}\\ln(\\left|{p_i-q_i}\\right|+1)$\n\n- `intersection(p, q)`\n\nReturns the [Intersection distance](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$d(p,q)=1-\\sum\\limits_{i=1}^{n}min(p_i,q_i)$\n\n- `waveHedges(p, q)`\n\nReturns the [Wave Hedges distance](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$d(p,q)=\\sum\\limits_{i=1}^{n}\\left(1-\\frac{min(p_i,q_i)}{max(p_i,q_i)}\\right)$\n\n- `czekanowski(p, q)`\n\nReturns the [Czekanowski distance](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$d(p,q)=1-\\frac{2\\sum\\limits_{i=1}^{n}{min(p_i,q_i)}}{\\sum\\limits_{i=1}^{n}{p_i+q_i}}$\n\n- `motyka(p, q)`\n\nReturns the [Motyka distance](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$d(p,q)=1-\\frac{\\sum\\limits_{i=1}^{n}{min(p_i,q_i)}}{\\sum\\limits_{i=1}^{n}{p_i+q_i}}$\n\nNote: distance between 2 identical vectors is 0.5 !\n\n- `tanimoto(p, q, [bitVector])`\n\nReturns the [Tanimoto distance](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q, and accepts the bitVector use, see the test case for an example\n\n- `innerProduct(p, q)`\n\nReturns the [Inner Product similarity](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$s(p,q)=\\sum\\limits_{i=1}^{n}{p_i\\cdot{q_i}}$\n\n- `harmonicMean(p, q)`\n\nReturns the [Harmonic mean similarity](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$d(p,q)=2\\sum\\limits_{i=1}^{n}\\frac{p_i\\cdot{q_i}}{p_i+q_i}$\n\n- `jaccard(p, q)`\n\nReturns the [Jaccard distance](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$d(p,q)=1-\\frac{\\sum\\limits_{i=1}^{n}{p_i\\cdot{q_i}}}{\\sum\\limits_{i=1}^{n}{p_i^2}+\\sum\\limits_{i=1}^{n}{q_i^2}-\\sum\\limits_{i=1}^{n}{p_i\\cdot{q_i}}}$\n\n- `dice(p,q)`\n\nReturns the [Dice distance](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$d(p,q)=\\frac{\\sum\\limits_{i=1}^{n}{(p_i-q_i)^2}}{\\sum\\limits_{i=1}^{n}{p_i^2}+\\sum\\limits_{i=1}^{n}{q_i^2}}$\n\n- `fidelity(p, q)`\n\nReturns the [Fidelity similarity](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$d(p,q)=\\sum\\limits_{i=1}^{n}{\\sqrt{p_i\\cdot{q_i}}}$\n\n- `bhattacharyya(p, q)`\n\nReturns the [Bhattacharyya distance](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$d(p,q)=-\\ln\\left(\\sum\\limits_{i=1}^{n}{\\sqrt{p_i\\cdot{q_i}}}\\right)$\n\n- `hellinger(p, q)`\n\nReturns the [Hellinger distance](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$d(p,q)=2\\cdot\\sqrt{1-\\sum\\limits_{i=1}^{n}{\\sqrt{p_i\\cdot{q_i}}}}$\n\n- `matusita(p, q)`\n\nReturns the [Matusita distance](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$d(p,q)=\\sqrt{2-2\\cdot\\sum\\limits_{i=1}^{n}{\\sqrt{p_i\\cdot{q_i}}}}$\n\n- `squaredChord(p, q)`\n\nReturns the [Squared-chord distance](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$d(p,q)=\\sum\\limits_{i=1}^{n}{(\\sqrt{p_i}-\\sqrt{q_i})^2}$\n\n- `squaredEuclidean(p, q)`\n\nReturns the [squared euclidean distance](http://en.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance) between vectors p and q\n\n$d(p,q)=\\sum\\limits_{i=1}^{n}{(p_i-q_i)^2}$\n\n- `pearson(p, q)`\n\nReturns the [Pearson distance](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$d(p,q)=\\sum\\limits_{i=1}^{n}{\\frac{(p_i-q_i)^2}{q_i}}$\n\n- `neyman(p, q)`\n\nReturns the [Neyman distance](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$d(p,q)=\\sum\\limits_{i=1}^{n}{\\frac{(p_i-q_i)^2}{p_i}}$\n\n- `squared(p, q)`\n\nReturns the [Squared distance](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$d(p,q)=\\sum\\limits_{i=1}^{n}{\\frac{(p_i-q_i)^2}{p_i+q_i}}$\n\n- `probabilisticSymmetric(p, q)`\n\nReturns the [Probabilistic Symmetric distance](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$d(p,q)=2\\cdot\\sum\\limits_{i=1}^{n}{\\frac{(p_i-q_i)^2}{p_i+q_i}}$\n\n- `divergence(p, q)`\n\nReturns the [Divergence distance](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$d(p,q)=2\\cdot\\sum\\limits_{i=1}^{n}{\\frac{(p_i-q_i)^2}{(p_i+q_i)^2}}$\n\n- `clark(p, q)`\n\nReturns the [Clark distance](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$d(p,q)=\\sqrt{\\sum\\limits_{i=1}^{n}{\\left(\\frac{\\left|p_i-q_i\\right|}{(p_i+q_i)}\\right)^2}}$\n\n- `additiveSymmetric(p, q)`\n\nReturns the [Additive Symmetric distance](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$d(p,q)=\\sum\\limits_{i=1}^{n}{\\frac{(p_i-q_i)^2\\cdot(p_i+q_i)}{p_i\\cdot{q_i}}}$\n\n- `kullbackLeibler(p, q)`\n\nReturns the [Kullback-Leibler distance](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$d(p,q)=\\sum\\limits_{i=1}^{n}{p_i\\cdot\\ln\\frac{p_i}{q_i}}$\n\n- `jeffreys(p, q)`\n\nReturns the [Jeffreys distance](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$d(p,q)=\\sum\\limits_{i=1}^{n}{\\left((p_i-q_i)\\ln\\frac{p_i}{q_i}\\right)}$\n\n- `kdivergence(p, q)`\n\nReturns the [K divergence distance](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$d(p,q)=\\sum\\limits_{i=1}^{n}{\\left(p_i\\cdot\\ln\\frac{2p_i}{p_i+q_i}\\right)}$\n\n- `topsoe(p, q)`\n\nReturns the [Topsøe distance](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$d(p,q)=\\sum\\limits_{i=1}^{n}{\\left(p_i\\cdot\\ln\\frac{2p_i}{p_i+q_i}+q_i\\cdot\\ln\\frac{2q_i}{p_i+q_i}\\right)}$\n\n- `jensenShannon(p, q)`\n\nReturns the [Jensen-Shannon distance](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$d(p,q)=\\frac{1}{2}\\left[\\sum\\limits_{i=1}^{n}{p_i\\cdot\\ln\\frac{2p_i}{p_i+q_i}}+\\sum\\limits_{i=1}^{n}{q_i\\cdot\\ln\\frac{2q_i}{p_i+q_i}}\\right]$\n\n- `jensenDifference(p, q)`\n\nReturns the [Jensen difference distance](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$d(p,q)=\\sum\\limits_{i=1}^{n}{\\left[\\frac{p_i\\ln{p_i}+q_i\\ln{q_i}}{2}-\\left(\\frac{p_i+q_i}{2}\\right)\\ln\\left(\\frac{p_i+q_i}{2}\\right)\\right]}$\n\n- `taneja(p, q)`\n\nReturns the [Taneja distance](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$d(p,q)=\\sum\\limits_{i=1}^{n}{\\left[\\frac{p_i+q_i}{2}\\ln\\left(\\frac{p_i+q_i}{2\\sqrt{p_i\\cdot{q_i}}}\\right)\\right]}$\n\n- `kumarJohnson(p, q)`\n\nReturns the [Kumar-Johnson distance](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$d(p,q)=\\sum\\limits_{i=1}^{n}{\\frac{\\left(p_i^2-q_i^2\\right)^2}{2(p_i\\cdot{q_i})^{3/2}}}$\n\n- `avg(p, q)`\n\nReturns the average of city block and Chebyshev distances between vectors p and q\n\n$d(p,q)=\\frac{\\sum\\limits_{i=1}^{n}{\\left|p_i-q_i\\right|}+\\max\\limits_i(|p_i-q_i|)}{2}$\n\n### Similarities\n\n- `intersection(p, q)`\n\nReturns the [Intersection similarity](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n- `czekanowski(p, q)`\n\nReturns the [Czekanowski similarity](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n- `motyka(p, q)`\n\nReturns the [Motyka similarity](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n- `kulczynski(p, q)`\n\nReturns the [Kulczynski similarity](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n- `squaredChord(p, q)`\n\nReturns the [Squared-chord similarity](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n- `cosine(p, q)`\n\nReturns the [Cosine similarity](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$s(p,q)=\\frac{\\sum\\limits_{i=1}^{n}{p_i\\cdot{q_i}}}{\\sqrt{\\sum\\limits_{i=1}^{n}{p_i^2}}\\sqrt{\\sum\\limits_{i=1}^{n}{q_i^2}}}$\n\n- `kumarHassebrook(p, q)`\n\nReturns the [Kumar-Hassebrook similarity](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n$s(p,q)=\\frac{\\sum\\limits_{i=1}^{n}{p_i\\cdot{q_i}}}{\\sum\\limits_{i=1}^{n}{p_i^2}+\\sum\\limits_{i=1}^{n}{q_i^2}-\\sum\\limits_{i=1}^{n}{p_i\\cdot{q_i}}}$\n\n- `pearson(p, q)`\n\nReturns the [Pearson correlation](https://en.wikipedia.org/wiki/Pearson_correlation_coefficient) between vectors p and q, i.e. the cosine similarity of the mean-centred vectors\n\n- `ruzicka(p, q)`\n\nReturns the [Ruzicka similarity](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf), also known as the [weighted Jaccard similarity](https://en.wikipedia.org/wiki/Jaccard_index#Weighted_Jaccard_similarity_and_distance), between vectors p and q. The matching distance is `soergel`.\n\n$s(p,q)=\\frac{\\sum\\limits_{i=1}^{n}{min(p_i,q_i)}}{\\sum\\limits_{i=1}^{n}{max(p_i,q_i)}}$\n\n- `dice(p, q)`\n\nReturns the [Dice similarity](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q\n\n- `tanimoto(p, q, [bitVector])`\n\nReturns the [Tanimoto similarity](http://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) between vectors p and q, and accepts the bitVector use, see the test case for an example\n\n- `tree(a,b, from, to, [options])`\n\nRefer to [ml-tree-similarity](https://github.com/mljs/tree-similarity)\n\n## Contributing\n\nA new metric should normally be in its own file in the `src/distances` (or `src/similarities`) directory. There should be a corresponding test file in the neighbouring `__tests__` directory.  \nThe metric should be then added in the exports of `src/distances.ts` (or `src/similarities.ts`) with a relatively small but understandable name (use camelCase).  \nIt should also be added to this README with either a link to the formula or an inline description.\n\n## Authors\n\n- [Michaël Zasso](https://github.com/targos)\n- [Miguel Angel Asencio Hurtado](https://github.com/maasencioh)\n\n## License\n\n[MIT](./LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/ml-distance.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/ml-distance\n[codecov-image]: https://img.shields.io/codecov/c/github/mljs/distance.svg\n[codecov-url]: https://codecov.io/gh/mljs/distance\n[download-image]: https://img.shields.io/npm/dm/ml-distance.svg?style=flat-square\n[download-url]: https://npmjs.org/package/ml-distance\n","readmeFilename":"README.md","users":{"eterna2":true,"dhrubins":true,"maasencioh":true}}