{"id":13507213,"url":"https://github.com/mrdimosthenis/emel","last_synced_at":"2025-08-23T22:02:53.827Z","repository":{"id":53203602,"uuid":"156930171","full_name":"mrdimosthenis/emel","owner":"mrdimosthenis","description":"A simple and functional machine learning library for the Erlang ecosystem","archived":false,"fork":false,"pushed_at":"2022-08-05T19:30:15.000Z","size":693,"stargazers_count":96,"open_issues_count":0,"forks_count":5,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-03-15T00:22:19.397Z","etag":null,"topics":["elixir","erlang","functional-programming","gleam","machine-learning"],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/emel/","language":"Gleam","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrdimosthenis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-09T23:44:28.000Z","updated_at":"2024-02-05T12:41:49.000Z","dependencies_parsed_at":"2022-08-13T02:20:43.429Z","dependency_job_id":null,"html_url":"https://github.com/mrdimosthenis/emel","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/mrdimosthenis%2Femel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrdimosthenis%2Femel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrdimosthenis%2Femel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrdimosthenis%2Femel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrdimosthenis","download_url":"https://codeload.github.com/mrdimosthenis/emel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243835942,"owners_count":20355611,"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","erlang","functional-programming","gleam","machine-learning"],"created_at":"2024-08-01T02:00:27.742Z","updated_at":"2025-03-17T01:30:49.860Z","avatar_url":"https://github.com/mrdimosthenis.png","language":"Gleam","funding_links":[],"categories":["Algorithms and Data structures","Packages","Elixir"],"sub_categories":["Machine Learning","Tools","[Tools](#tools-1)","Speech Recognition"],"readme":"# emel\n\nTurn data into functions! A simple and functional **machine learning** library, (re)implemented in **Gleam** for the **Erlang** ecosystem.\n\n## Installation\n\n* For **Erlang** projects, add the dependency into `rebar.config`:\n\n```erlang\n{deps, [\n    {emel, \"1.0.1\"}\n]}.\n```\n\n* For **Elixir** projects, add the dependency into `mix.exs`:\n\n```elixir\ndefp deps do\n  [\n    {:emel, \"~\u003e 1.0.1\"}\n  ]\nend\n```\n\n* For **Gleam** projects, run `gleam add emel`.\n\n## Examples\n\n### Erlang\n\n```erlang\nData = [\n  {[7.0, 7.0], \"bad\"},\n  {[7.0, 4.0], \"bad\"},\n  {[3.0, 4.0], \"good\"},\n  {[1.0, 4.0], \"good\"}\n],\nF = emel@ml@k_nearest_neighbors:classifier(Data, 3),\nF([3.0, 7.0]). % \"good\"\n```\n \n### Elixir\n\n```elixir\ndata = [\n  {[1.794638, 15.15426], 0.510998918},\n  {[3.220726, 229.6516], 105.6583692},\n  {[5.780040, 3480.201], 1776.99}\n]\nf = :emel@ml@linear_regression.predictor(data)\nf.([3.0, 230.0]) # 106.74114058686602\n```\n\n### Gleam\n\n```gleam\nimport emel/ml/neural_network as nn\nlet data = [\n  #([0.8, 0.0, 0.0], \"x\"),\n  #([0.0, 0.9, 0.0], \"y\"),\n  #([0.0, 0.0, 0.8], \"z\"),\n]\nlet f = nn.classifier(\n    data,\n    [4],           // hidden layers\n    0.01,          // learning rate\n    0.1,           // error threshold\n    1000           // maximum iterations\n)\nf([0.0, 0.8, 0.0]) // \"y\"\n```\n\n## Documentation\n\nThe [documentation](https://hexdocs.pm/emel/1.0.0/) describes all the public functions. **Gleam** developers can pay attention to the type annotations. **Erlang** and **Elixir** devs may take a look at the examples which are written in **Erlang**.\n\n### Implemented Algorithms\n\n * [Linear Regression](https://hexdocs.pm/emel/1.0.0/emel/ml/linear_regression.html)\n * [K Nearest Neighbors](https://hexdocs.pm/emel/1.0.0/emel/ml/k_nearest_neighbors.html)\n * [Decision Tree](https://hexdocs.pm/emel/1.0.0/emel/ml/decision_tree.html)\n * [Naive Bayes](https://hexdocs.pm/emel/1.0.0/emel/ml/naive_bayes.html)\n * [K Means](https://hexdocs.pm/emel/1.0.0/emel/ml/k_means.html)\n * [Perceptron](https://hexdocs.pm/emel/1.0.0/emel/ml/perceptron.html)\n * [Logistic Regression](https://hexdocs.pm/emel/1.0.0/emel/ml/logistic_regression.html)\n * [Neural Network](https://hexdocs.pm/emel/1.0.0/emel/ml/neural_network.html)\n\n### Mathematics\n\n* [Algebra](https://hexdocs.pm/emel/1.0.0/emel/math/algebra.html)\n* [Geometry](https://hexdocs.pm/emel/1.0.0/emel/math/geometry.html)\n* [Statistics](https://hexdocs.pm/emel/1.0.0/emel/math/statistics.html)\n\n_For the documentation of the previous version (`0.3.0`), click [here](https://hexdocs.pm/emel/0.3.0/)._\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrdimosthenis%2Femel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrdimosthenis%2Femel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrdimosthenis%2Femel/lists"}