{"id":13691136,"url":"https://github.com/elixir-nx/scholar","last_synced_at":"2025-05-16T07:07:20.479Z","repository":{"id":40482881,"uuid":"461248297","full_name":"elixir-nx/scholar","owner":"elixir-nx","description":"Traditional machine learning on top of Nx","archived":false,"fork":false,"pushed_at":"2023-12-19T00:23:03.000Z","size":812,"stargazers_count":305,"open_issues_count":10,"forks_count":34,"subscribers_count":15,"default_branch":"main","last_synced_at":"2023-12-19T17:23:17.524Z","etag":null,"topics":["elixir","machine-learning"],"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/elixir-nx.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-02-19T16:30:10.000Z","updated_at":"2023-12-24T19:40:07.922Z","dependencies_parsed_at":"2023-02-17T05:00:42.797Z","dependency_job_id":"737c679c-3e89-4f7c-b89e-a871874e1357","html_url":"https://github.com/elixir-nx/scholar","commit_stats":null,"previous_names":[],"tags_count":3,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-nx%2Fscholar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-nx%2Fscholar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-nx%2Fscholar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-nx%2Fscholar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elixir-nx","download_url":"https://codeload.github.com/elixir-nx/scholar/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254485065,"owners_count":22078767,"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":["elixir","machine-learning"],"created_at":"2024-08-02T17:00:40.771Z","updated_at":"2025-05-16T07:07:18.039Z","avatar_url":"https://github.com/elixir-nx.png","language":"Elixir","funding_links":[],"categories":["Machine Learning"],"sub_categories":["Traditional Machine Learning"],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/elixir-nx/scholar/raw/main/images/scholar.png\" alt=\"Scholar\" width=\"400\"\u003e\n  \u003cbr /\u003e\n  \u003ca href=\"https://hexdocs.pm/scholar\"\u003e\u003cimg src=\"http://img.shields.io/badge/hex.pm-docs-green.svg?style=flat\" title=\"Documentation\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://hex.pm/packages/scholar\"\u003e\u003cimg src=\"https://img.shields.io/hexpm/v/scholar.svg\" title=\"Package\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr /\u003e\n\nTraditional machine learning tools built on top of Nx. Scholar implements\nseveral algorithms for classification, regression, clustering, dimensionality\nreduction, metrics, and preprocessing.\n\nFor deep learning, see [Axon](https://github.com/elixir-nx/axon).\nFor decision trees/forests, see [EXGBoost](https://github.com/acalejos/exgboost).\n\n## Installation\n\n### Mix projects\n\nAdd to your `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:scholar, \"~\u003e 0.3.0\"}\n  ]\nend\n```\n\nBesides Scholar, you will most likely want to use an existing Nx compiler/backend,\nsuch as EXLA:\n\n```elixir\ndef deps do\n  [\n    {:scholar, \"~\u003e 0.3.0\"},\n    {:exla, \"\u003e= 0.0.0\"}\n  ]\nend\n```\n\nAnd then in your `config/config.exs` file:\n\n```elixir\nimport Config\nconfig :nx, :default_backend, EXLA.Backend\n# Client can also be set to :cuda / :rocm\nconfig :nx, :default_defn_options, [compiler: EXLA, client: :host]\n```\n\n\u003e #### JIT required! {: .warning}\n\u003e\n\u003e It is important you set the `default_defn_options` as shown in the snippet above,\n\u003e as many algorithms in Scholar use loops which are much more memory efficient when\n\u003e JIT compiled.\n\u003e\n\u003e If for some reason you cannot set a default `defn` compiler, you can explicitly\n\u003e JIT any function, for example: `EXLA.jit(\u0026Scholar.Cluster.AffinityPropagation.fit/1)`.\n\n### Notebooks\n\nTo use Scholar inside code notebooks, run:\n\n```elixir\nMix.install([\n  {:scholar, \"~\u003e 0.3.0\"},\n  {:exla, \"\u003e= 0.0.0\"}\n])\n\nNx.global_default_backend(EXLA.Backend)\n# Client can also be set to :cuda / :rocm\nNx.Defn.global_default_options(compiler: EXLA, client: :host)\n```\n\n\u003e #### JIT required! {: .warning}\n\u003e\n\u003e It is important you set the `Nx.Defn.global_default_options/1` as shown in the snippet\n\u003e above, as many algorithms in Scholar use loops which are much more memory efficient\n\u003e when JIT compiled.\n\u003e\n\u003e If for some reason you cannot set a default `defn` compiler, you can explicitly\n\u003e JIT any function, for example: `EXLA.jit(\u0026Scholar.Cluster.AffinityPropagation.fit/1)`.\n\n## License\n\nCopyright (c) 2022 The Machine Learning Working Group of the Erlang Ecosystem Foundation\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixir-nx%2Fscholar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felixir-nx%2Fscholar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixir-nx%2Fscholar/lists"}