{"_id":"@aidanconnelly/tsnejs","_rev":"2-e3bb948e09515b3b33176823cf31b0cc","name":"@aidanconnelly/tsnejs","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.3":{"name":"@aidanconnelly/tsnejs","version":"0.1.3","description":"t-SNE visualization algorithm","main":"src/index.js","keywords":["stochastic","histogram","Markov","probability","Brownian","Normal","Poisson"],"scripts":{"docs":"documentation readme -s API src/index.js","examples":"for A in examples/*.js ; do ./node_modules/.bin/babel-node $A; done","lint":"eslint src","prepublish":"babel src --out-dir lib && npm run docs && ./node_modules/.bin/webpack","release":"npm run lint && npm run prepublish && npm version patch && git push && git push origin --tags && npm publish --access public","start":"babel-node src/index.js","test":"babel-node tests/index.js"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/jwalsh/tsnejs.git"},"devDependencies":{"babel-cli":"^6.14.0","babel-plugin-transform-flow-strip-types":"^6.14.0","babel-preset-es2015":"^6.16.0","documentation":"^4.0.0-beta10","eslint":"^3.5.0","flow-bin":"^0.32.0","js.spec":"^1.0.0-0","lodash":"^4.17.2","webpack":"^1.13.2"},"dependencies":{"babel-plugin-syntax-flow":"^6.13.0","lebab":"^2.5.1"},"gitHead":"79be6da33d6fd63edd52de259d7e4248c55c7027","bugs":{"url":"https://github.com/jwalsh/tsnejs/issues"},"homepage":"https://github.com/jwalsh/tsnejs#readme","_id":"@aidanconnelly/tsnejs@0.1.3","_npmVersion":"6.4.1","_nodeVersion":"8.10.0","_npmUser":{"name":"aidanconnelly","email":"aidan.connelly@students.plymouth.ac.uk"},"dist":{"integrity":"sha512-VOAY26O+dxqTpo9swSGWBKNe3Aut0QJaGXYgCNG/2SpbsRXBjKdGV6f4JxLauQsIMxexXFS9bsPPykmrglHA9A==","shasum":"b04e42b726d58b8d9e912afe7bfc8b9280865f7e","tarball":"https://registry.npmjs.org/@aidanconnelly/tsnejs/-/tsnejs-0.1.3.tgz","fileCount":17,"unpackedSize":73421,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclfeHCRA9TVsSAnZWagAAp7wP/3bbUQP/BsQy4877muyw\nm/pCbo7QxEhMy9zflGBKchBQgGK2s08YDZ9Jh2+/i8r4lqbN9tFb/ixkYm41\niRSyu6x6BKKlvvWoO2Zv+2khVMlAp9ZUDd1SLEC9O9dtSX5yI8v734NYwzfq\nmgQeJYdRn8pSBA9UZ3Q3vXOredzwFNjag0CTfxobkuGZABmUsl9E+dYrHmhv\nS95KEYDayFvfDAFDwn0w/WyArwojKljZ3TFpwKolAmC2b78ydA9ccTbwcKmN\nWB7yqZOCAyrHY444aFa9+hoFRNW0JkWKJrSW/Zd2++GeR+ESQkl9rZYF5cO9\nhJx+v6mPOXpbKqGdT5t2NJM5D156FLLYhV/oBIhOt20e1eJ9W+kXDWsF/dnO\nQRI1ev4dtC/m7/6ZC5irA2HXBNXQNXt5QiWHFT0+spV2L78wlCGClfsB4bQr\nwvxwjc/ZpqI+Q8dv32DMMFHhliONAOD1Bq/ZbRAASSncDVe51lbS4+eWx/Sd\nmf9VRdsVOXBMSceGtkOxi9re2/xW4Ytyj/o+nbj4TQr51/ZGSlA+gzgL2fHB\nAj9OEQ05XAyEIko/6t8o1rEz7ZwisYyYg2EiNCbVtwWZ2w+SsvYt+ZMgmOM/\nf6jH24Q0L+FOdkPkNb2aCuIRAnQWBdabwyIS6KU6Q8Nnyafh2GyUSVeCrRU2\na1XA\r\n=/lgK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF/CJatGsKw5rWgl/UmOHFvWofD1pmYh+UxfZ7HMYVrIAiBguit/1f/qgCEaFkP+IbPomll+xtKrO2+N7yERZ/Jv0w=="}]},"maintainers":[{"name":"aidanconnelly","email":"aidan.connelly@students.plymouth.ac.uk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tsnejs_0.1.3_1553332103195_0.6775515334074731"},"_hasShrinkwrap":false},"0.1.4":{"name":"@aidanconnelly/tsnejs","version":"0.1.4","description":"t-SNE visualization algorithm","main":"lib/index.js","keywords":["stochastic","histogram","Markov","probability","Brownian","Normal","Poisson"],"scripts":{"docs":"documentation readme -s API lib/index.js","examples":"for A in examples/*.js ; do ./node_modules/.bin/babel-node $A; done","lint":"eslint src","prepublish":"babel src --out-dir lib && npm run docs && ./node_modules/.bin/webpack","release":"npm run lint && npm run prepublish && npm version patch && git push && git push origin --tags && npm publish --access public","start":"babel-node lib/index.js","test":"babel-node tests/index.js"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/jwalsh/tsnejs.git"},"devDependencies":{"babel-cli":"^6.14.0","babel-plugin-transform-flow-strip-types":"^6.14.0","babel-preset-es2015":"^6.16.0","documentation":"^4.0.0-beta10","eslint":"^3.5.0","flow-bin":"^0.32.0","js.spec":"^1.0.0-0","lodash":"^4.17.2","webpack":"^1.13.2"},"dependencies":{"babel-plugin-syntax-flow":"^6.13.0","lebab":"^2.5.1"},"gitHead":"79be6da33d6fd63edd52de259d7e4248c55c7027","bugs":{"url":"https://github.com/jwalsh/tsnejs/issues"},"homepage":"https://github.com/jwalsh/tsnejs#readme","_id":"@aidanconnelly/tsnejs@0.1.4","_npmVersion":"6.4.1","_nodeVersion":"8.10.0","_npmUser":{"name":"aidanconnelly","email":"aidan.connelly@students.plymouth.ac.uk"},"dist":{"integrity":"sha512-KQRKcZL8md34CS10DybjQqPkXQp7SXo2lKq5JWGksB9DLzI/ZZO0l/ZjxVWxUAupIDiBETK/gk/vCV1jGn+qzA==","shasum":"974f2dcb891a7fb7fd5411e06dcfe16262062817","tarball":"https://registry.npmjs.org/@aidanconnelly/tsnejs/-/tsnejs-0.1.4.tgz","fileCount":17,"unpackedSize":80362,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclfiSCRA9TVsSAnZWagAAbGMP/0C5RL/keQYPA3TsXjoK\nvpQ7bAYqgrb3HJ60z8gEbKv9oZkbNUh3Ab8AHHFoKBYk2ztrWQZ8jYZEJGnI\nNMWfyF7hwcslZpb5o+4IU3M2aI5F6XPx5b7FgNxxv2z3m2hdpg1VpJYuezoI\n5mrSk12eux/OkDfTolh08tT73Lg/v+tZYcBE4XE0hI/AwenRT6E07ZHQrJbd\n6Y3VoffGO+ZcxwRdXsNJTM2THa2N969nfWZXN5jGBzp+J7TLF59xqbba6Hlq\n1LalsXTkLian4r9H/esN0lW+EyRmYHOpPzkMhaohLMIn5AwAyDSNVg91cJyF\nVC9UwD+TYJCdQxD/vYeD6q2AAWVXPNY8PxUQuQToxdCa1SloEuFLfJqkotSq\nde63NBJi9UOU3yUl0pBNa8TlRpK4sWh3E7vlPnqjZH8O5OF+E5nR9Blu3F2E\ngiWpnSRWVdggmmkGIzSijPpP4SIIMNoTrEr4OpjTYN6YJdmoDgqUDuAs0T3+\nh2fobB8ujK7Wg8QZtJDT+PT2F2WsS3cYaiw/sLFNF7KcIjYr317l0hiJYeJO\n1fQJduDi1J/GBT8z3CE2cc32gb5cIwY35sLuRdfmG9EgK0hMmheAolr4H55D\nGWNz136bSBA5iu9Aw640yUi7apXnSjcSZzR/sh/Didd8NgthQke2BDsgjqLs\n/dvy\r\n=HcsB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFiw1eeQphCTC+PqKihpsD3f67tRI3YyN5nFzEKOlU/MAiAsVHYlHJyPt/ayo+gCnuM2CCSjEqRfYaHA515AypH/JQ=="}]},"maintainers":[{"name":"aidanconnelly","email":"aidan.connelly@students.plymouth.ac.uk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tsnejs_0.1.4_1553332370113_0.7972801601954798"},"_hasShrinkwrap":false}},"time":{"created":"2019-03-23T09:08:23.013Z","0.1.3":"2019-03-23T09:08:23.383Z","modified":"2022-04-04T12:16:25.773Z","0.1.4":"2019-03-23T09:12:50.274Z"},"maintainers":[{"name":"aidanconnelly","email":"aidan.connelly@students.plymouth.ac.uk"}],"description":"t-SNE visualization algorithm","homepage":"https://github.com/jwalsh/tsnejs#readme","keywords":["stochastic","histogram","Markov","probability","Brownian","Normal","Poisson"],"repository":{"type":"git","url":"git+https://github.com/jwalsh/tsnejs.git"},"bugs":{"url":"https://github.com/jwalsh/tsnejs/issues"},"license":"MIT","readme":"# tSNEJS\n\ntSNEJS is an implementation of t-SNE visualization algorithm in Javascript. \n\nt-SNE is a visualization algorithm that embeds things in 2 or 3\ndimensions. If you have some data and you can measure their pairwise\ndifferences, t-SNE visualization can help you identify clusters in your\ndata. \n\n## Online demo\n\nThe main project website has a\n[live example](http://cs.stanford.edu/people/karpathy/tsnejs/) and more\ndescription.\n\nThere is also the\n[t-SNE CSV demo](http://cs.stanford.edu/people/karpathy/tsnejs/csvdemo.html)\nthat allows you to simply paste CSV data into a textbox and tSNEJS\ncomputes and visualizes the embedding on the fly (no coding needed).\n\n## Research Paper\n\nThe algorithm was originally described in this paper:\n\n    L.J.P. van der Maaten and G.E. Hinton.\n    Visualizing High-Dimensional Data Using t-SNE. Journal of Machine Learning Research\n    9(Nov):2579-2605, 2008.\n\nYou can find the PDF\n[here](http://jmlr.csail.mit.edu/papers/volume9/vandermaaten08a/vandermaaten08a.pdf).\n\n## Example\n\n```shell\nnpm --save i @jwalsh/tsnejs\n```\n\n```javascript\nimport * as tsnejs from '@jwalsh/tsnejs';\n\nconst opt = {\n  epsilon: 10,    // epsilon is learning rate (10 = default)\n  perplexity: 30, // roughly how many neighbors each point influences (30 = default)\n  dim: 2 // dimensionality of the embedding (2 = default)\n};\n\nconst tsne = new tsnejs.tSNE(opt); // create a tSNE instance\n\n// initialize data. Here we have 3 points and some example pairwise dissimilarities\nconst dists = [[1.0, 0.1, 0.2], [0.1, 1.0, 0.3], [0.2, 0.1, 1.0]];\ntsne.initDataDist(dists);\n\n// every time you call this, solution gets better\n[...Array(500)].forEach((_, i) => tsne.step());\n\nconst Y = tsne.getSolution(); // Y is an array of 2-D points that you can plot\n```\n\nThe data can be passed to tSNEJS as a set of high-dimensional points\nusing the `tsne.initDataRaw(X)` function, where X is an array of arrays\n(high-dimensional points that need to be embedded). The algorithm\ncomputes the Gaussian kernel over these points and then finds the\nappropriate embedding.\n\n## API\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n### getopt\n\nsyntax sugar\n\n**Parameters**\n\n-   `opt`  \n-   `field`  \n-   `defaultval`  \n\n### return_v\n\nreturn 0 mean unit standard deviation random number\n\n### randn\n\nreturn random normal number\n\n### zeros\n\nutilitity that creates contiguous vector of zeros of size n\n\n**Parameters**\n\n-   `n`  \n\n### randn2d\n\nutility that returns 2d array filled with random numbers\nor with value s, if provided\n\n### L2\n\ncompute L2 distance between two vectors\n\n### xtod\n\ncompute pairwise distance in all vectors in X\n\n### d2p\n\ncompute (p_{i|j} + p_{j|i})/(2n)\n\n### sign\n\nhelper function\n\n**Parameters**\n\n-   `x`  \n\n### tSNE\n\nt-SNE visualization algorithm\n\n## Web Demos\n\nThere are two web interfaces to this library that we are aware of:\n\n-   By Andrej,\n    [here](http://cs.stanford.edu/people/karpathy/tsnejs/csvdemo.html).\n-   By Laurens, [here](http://homepage.tudelft.nl/19j49/tsnejs/), which\n    takes data in different format and can also use Google Spreadsheet\n    input.\n\n## About\n\nSend questions to [@karpathy](https://twitter.com/karpathy).\n\n## License\n\nMIT\n","readmeFilename":"README.md"}