{"name":"ml-tree-similarity","version":"2.1.0","description":"Compares two spectra using a tree similarity","main":"lib/index.js","module":"src/index.js","types":"tree-similarity.d.ts","scripts":{"compile":"rollup -c","eslint":"eslint src","eslint-fix":"npm run eslint -- --fix","prepack":"npm run compile","prettier":"prettier --check src","prettier-write":"prettier --write src","test":"npm run test-only && npm run eslint && npm run prettier","test-only":"vitest run --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","devDependencies":{"@babel/plugin-transform-modules-commonjs":"^7.23.3","@vitest/coverage-v8":"^1.2.2","eslint":"^8.56.0","eslint-config-cheminfo":"^9.1.1","prettier":"^3.2.5","rollup":"^4.9.6","vitest":"^1.2.2"},"dependencies":{"binary-search":"^1.3.6","cheminfo-types":"^1.7.2"},"_id":"ml-tree-similarity@2.1.0","gitHead":"226db00203d5286ae5873b3c12cdfb19a2905c60","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-c3Ey//GtV5JjbMS4YNC9HEtGVp0gKl/pEJnQaNBFouHG+A7YvtWaS0wwsSv1BN5NEft+pMxNOsEfqp0XvgjL7A==","shasum":"fdfc9f4f4738f1b13819bdeffa7ca4516d574f36","tarball":"http://registry-npm.ywwl.com/ml-tree-similarity/download/ml-tree-similarity-2.1.0.tgz","fileCount":13,"unpackedSize":14531,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDoa5GDpDcjERorRoMR+UuF5dsXXxiEI1NS+YdSpmnPwwIgXrBQsxTZRIpMm3FyxVp0AJWlQSymbvb5Ada5L7D4lQ8="}],"size":4271,"noattachment":false,"key":"/ml-tree-similarity/-/ml-tree-similarity-2.1.0.tgz"},"_npmUser":{"name":"mljs-bot","email":"bot+npm-mljs@zakodium.com"},"directories":{},"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":"maasencioh","email":"maasencioh@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ml-tree-similarity_2.1.0_1707829772970_0.0645438080102112"},"_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":1707829773153,"_cnpm_publish_time":1707829773153,"dist-tags":{"latest":"2.2.0"}}