{"id":22710563,"url":"https://github.com/smallhelm/sdr","last_synced_at":"2025-10-19T19:31:47.500Z","repository":{"id":57371630,"uuid":"62272362","full_name":"smallhelm/sdr","owner":"smallhelm","description":"javascirpt functions to work with Sparse Distributed Representations","archived":false,"fork":false,"pushed_at":"2016-06-30T03:48:40.000Z","size":5,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-11T07:38:52.937Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smallhelm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-30T02:19:40.000Z","updated_at":"2024-02-23T19:57:34.000Z","dependencies_parsed_at":"2022-09-09T18:20:46.135Z","dependency_job_id":null,"html_url":"https://github.com/smallhelm/sdr","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhelm%2Fsdr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhelm%2Fsdr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhelm%2Fsdr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhelm%2Fsdr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smallhelm","download_url":"https://codeload.github.com/smallhelm/sdr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237205195,"owners_count":19271795,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-10T12:10:31.073Z","updated_at":"2025-10-19T19:31:47.199Z","avatar_url":"https://github.com/smallhelm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sdr\n\n[![build status](https://secure.travis-ci.org/smallhelm/sdr.svg)](https://travis-ci.org/smallhelm/sdr)\n\nFunctions for working with [Sparse Distributed Representation](https://github.com/numenta/nupic/wiki/Sparse-Distributed-Representations)\n\n\u003e one of biggest problems in AI\n\u003e --no, the only problem in AI--\n\u003e is the problem of representation\nSo said a [retiring AI researcher](https://youtu.be/A8sHMcCk0lU?t=9m51s)\n\nIf you don't know what SDRs are, you should go learn about them. [numenta.org](http://numenta.org) Or watch [these videos](https://www.youtube.com/playlist?list=PL3yXMgtrZmDqhsFQzwUC9V8MeeVOQ7eZ9) for an easy to follow introduction.\n\n## Usage\n\nYour SDR arrays are always assumed to be in order from least to greatest. The functions use this assumption to optimize performance.\n\n```js\nvar sdr = require('sdr');\n\nsdr.union(\n  [0, 10, 15, 30],\n  [0,  5, 10, 20]\n);\n//-\u003e [0, 5, 10, 15, 20, 30]\n\nsdr.intersect(\n  [1, 2],\n  [2, 3]\n);\n//-\u003e [2]\n\nsdr.sparsity([0, 10, 20], 100);\n//-\u003e 0.03\n\nsdr.capacity(2048, 40);\n//-\u003e 2.3717785116453587e+84\n```\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmallhelm%2Fsdr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmallhelm%2Fsdr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmallhelm%2Fsdr/lists"}