{"id":18000121,"url":"https://github.com/amplifiedai/tsne","last_synced_at":"2025-03-26T07:32:01.188Z","repository":{"id":150322018,"uuid":"622944471","full_name":"amplifiedai/tsne","owner":"amplifiedai","description":"Bindings to efficient exact and Barnes-Hut t-SNE for Elixir","archived":false,"fork":false,"pushed_at":"2023-05-09T08:20:08.000Z","size":43,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-25T07:17:47.594Z","etag":null,"topics":["dimensionality-reduction","elixir","machine-learning","rust"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amplifiedai.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS.md","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-03T11:37:42.000Z","updated_at":"2024-05-18T18:26:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"cd52b45b-87ab-4b60-84f1-f26dbdffa960","html_url":"https://github.com/amplifiedai/tsne","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amplifiedai%2Ftsne","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amplifiedai%2Ftsne/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amplifiedai%2Ftsne/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amplifiedai%2Ftsne/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amplifiedai","download_url":"https://codeload.github.com/amplifiedai/tsne/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245611733,"owners_count":20643886,"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":["dimensionality-reduction","elixir","machine-learning","rust"],"created_at":"2024-10-29T23:09:44.424Z","updated_at":"2025-03-26T07:32:01.180Z","avatar_url":"https://github.com/amplifiedai.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tsne\n\n![CI](https://github.com/amplifiedai/tsne/actions/workflows/ci.yml/badge.svg)\n[![Documentation](http://img.shields.io/badge/hex.pm-docs-green.svg?style=flat)](https://hexdocs.pm/tsne)\n[![Package](https://img.shields.io/hexpm/v/tsne.svg)](https://hex.pm/packages/tsne)\n\nFrom Wikipedia: [t-distributed stochastic neighbor embedding](https://en.wikipedia.org/wiki/T-distributed_stochastic_neighbor_embedding) (t-SNE) is a statistical method for visualizing high-dimensional data by giving each datapoint a location in a two or three-dimensional map.\n\nThis is an extremely low effort set of bindings to the Rust [`bhtsne`](https://docs.rs/bhtsne/latest/bhtsne/) crate.\n\nYou might use it like this:\n\n```elixir\nMix.install(\n  [\n    {:exla, \"~\u003e 0.5\"},\n    {:nx, \"~\u003e 0.5\"},\n    {:rustler, \"~\u003e 0.0\"},\n    {:scholar, \"~\u003e 0.1\"},\n    {:tsne, \"~\u003e 0.1\"}\n  ],\n  config: [\n    nx: [default_backend: EXLA.Backend]\n  ]\n)\n\n# Generate some random data.\nkey = Nx.Random.key(42)\n{data, _} = Nx.Random.normal(key, 0, 1, shape: {1000, 256}, type: :f32)\n\n# If your data is has high dimensionality, it's recommended to bring things\n# down a fair bit using PCA before using t-SNE.\nprincipal_components = Scholar.Decomposition.PCA.fit_transform(data, num_components: 50)\n\nprincipal_components\n|\u003e Nx.to_list() # `Tsne` expects a list of lists.\n|\u003e Tsne.barnes_hut()\n```\n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed\nby adding `tsne` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:tsne, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\nDocumentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)\nand published on [HexDocs](https://hexdocs.pm). Once published, the docs can\nbe found at \u003chttps://hexdocs.pm/tsne\u003e.\n\n## License\n\nCopyright (c) 2023 Christopher Grainger\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n\nSome code this library relies on [`bhtsne`](https://github.com/frjnn/bhtsne) is MIT licensed. As required by that license, the copyright notice and permission notice are included here:\n\nMIT License\n\nCopyright (c) 2021 Francesco Iannelli\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famplifiedai%2Ftsne","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famplifiedai%2Ftsne","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famplifiedai%2Ftsne/lists"}