{"name":"ml-tree-similarity","version":"1.0.0","description":"Compares two spectra using a tree similarity","main":"lib/index.js","module":"src/index.js","scripts":{"compile":"rollup -c","eslint":"eslint src","eslint-fix":"npm run eslint -- --fix","prepublishOnly":"npm run compile","test":"npm run test-coverage && npm run eslint","test-only":"jest","test-coverage":"jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/mljs/tree-similarity.git"},"keywords":[],"author":{"name":"Miguel Asencio"},"license":"MIT","bugs":{"url":"https://github.com/mljs/tree-similarity/issues"},"homepage":"https://github.com/mljs/tree-similarity#readme","jest":{"testEnvironment":"node"},"devDependencies":{"@babel/plugin-transform-modules-commonjs":"^7.4.4","eslint":"^6.0.1","eslint-config-cheminfo":"^1.20.1","eslint-plugin-import":"^2.18.0","eslint-plugin-jest":"^22.7.1","jest":"^24.8.0","rollup":"^1.16.3"},"dependencies":{"binary-search":"^1.3.5","num-sort":"^2.0.0"},"gitHead":"5a9b0730818e72253299c8746db7310f91053d54","_id":"ml-tree-similarity@1.0.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-XJUyYqjSuUQkNQHMscr6tcjldsOoAekxADTplt40QKfwW6nd++1wHWV9AArl0Zvw/TIHgNaZZNvr8QGvE8wLRg==","shasum":"24705a107e32829e24d945e87219e892159c53f0","tarball":"http://registry-npm.ywwl.com/ml-tree-similarity/download/ml-tree-similarity-1.0.0.tgz","fileCount":11,"unpackedSize":12871,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdF9x1CRA9TVsSAnZWagAASZwP/Roet3T4DXSppW97cwyH\n3YfSbPWeE6Qfq2s3Ym6+eiGnaTG0CA0qH+SB03s+xg+GzHlt8KOw4aHg/o7E\n1Q8CODbcxZS/4Byl1ng6Gg4AEqooSoSuBTeM7tPZw9zix5cqON7LqoB8Ouhw\nBE20DoGA/pJD6JJnincHpZvtkoiJNgLsQ8fU5MLbO27vTvh+eBw69mkAHM7M\nwrpel0LxLoOpNQmY1p27dcX28DshCA5dcDCxLlIlJRo6DIZJ4UCucKh2ob/4\n1DuuSwXyx9+/sPF24qHqEOYwyRL7HlXIVSla3fwrVfxsiUApMVuzpCeH6xUG\n4CbL0taj3Ja432uXPtV5YnIL2PVFE0BPT1qkIQjyeHOVo0fp0cgiz8aAmqWa\nMydjbFEJLAJ6wcCvwW2kAEchkSEHkTjWnAQGIDqY+rqnBMeYO1vgRw0sHUUr\n4sCwb/mitttnprR5BSOFxFNTMprlCVdhRxkMvF2M5gT0BfTaQtepU52Aby3h\naoKZgL5DvV/lH75dWjDTbvnyYHcpFpc2RcGoBC4YyDvvy+Xsjmb3NrY/B5LD\nY+Tzqe+3PS5d6SeIQoLDQ1V7fzrCWhtSV9w1kML+8kXPrU4PRSK5+XfxD8NR\ndRVkyWufpTwpP7Q5UYS+3Q9rJHd9BbH2k89s8wk8Gg/0uu3b+ranWLJakbzg\nYXiV\r\n=1/7m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDXAnSje43WIf0d23HG0x7YKhWN/eoP4y+2RTsicfUE9AiBacqGHlH28xMMCPvzwvOONn+SlGjBM6sZ00E1NnIf8Pg=="}],"size":4090,"noattachment":false,"key":"/ml-tree-similarity/-/ml-tree-similarity-1.0.0.tgz"},"maintainers":[{"email":"swrt_9950@hotmail.com","name":"jeffersonh44"},{"email":"lpatiny@gmail.com","name":"lpatiny"},{"email":"maasencioh@gmail.com","name":"maasencioh"},{"email":"kostro.d@gmail.com","name":"stropitek"},{"email":"targos@live.com","name":"targos"}],"_npmUser":{"name":"targos","email":"targos+npm@protonmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ml-tree-similarity_1.0.0_1561844852960_0.9705818641888713"},"_hasShrinkwrap":false,"readme":"# tree-similarity\n\n[![NPM version][npm-image]][npm-url]\n[![Test coverage][codecov-image]][codecov-url]\n[![npm download][download-image]][download-url]\n\nCompares two spectra using a tree similarity.\n\n## Installation\n\n`$ npm i ml-tree-similarity`\n\n## Usage\n\n```js\nimport { createTree, treeSimilarity } from 'ml-tree-similarity';\n\nconst a = {\n  x: [1, 2, 3, 4, 5, 6, 7],\n  y: [0.3, 0.7, 4, 0.3, 0.2, 5, 0.3],\n};\nconst b = {\n  x: [1, 2, 3, 4, 5, 6, 7],\n  y: [0.3, 4, 0.7, 0.3, 5, 0.2, 0.3],\n};\n\n// create a tree\nconst options = { from: 1, to: 7 };\nconst aTree = createTree(a, options);\nconst bTree = createTree(b, options);\n\nconst ans = treeSimilarity(aTree, bTree, options);\n```\n\n## [API Documentation](https://mljs.github.io/tree-similarity/)\n\nThis algorithm was based in the following papers:\n\n- [A new method for the comparison of 1H NMR predictors based on tree-similarity of spectra](https://doi.org/10.1186/1758-2946-6-9)\n- [Fast and shift-insensitive similarity comparisons of NMR using a tree-representation of spectra](https://doi.org/10.1016/j.chemolab.2013.05.009)\n\n## License\n\n[MIT](./LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/ml-tree-similarity.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/ml-tree-similarity\n[codecov-image]: https://img.shields.io/codecov/c/github/mljs/tree-similarity.svg?style=flat-square\n[codecov-url]: https://codecov.io/github/mljs/tree-similarity\n[download-image]: https://img.shields.io/npm/dm/ml-tree-similarity.svg?style=flat-square\n[download-url]: https://npmjs.org/package/ml-tree-similarity\n","publish_time":1561844853085,"_cnpm_publish_time":1561844853085,"dist-tags":{"latest":"2.2.0"}}