{"id":15725874,"url":"https://github.com/ndrean/linear_regression_nx_axon","last_synced_at":"2025-03-31T01:27:04.831Z","repository":{"id":124425617,"uuid":"587666245","full_name":"ndrean/linear_regression_nx_axon","owner":"ndrean","description":"Linear Regressions with Nx, matrices, gradient descent, Neural Network with Axon","archived":false,"fork":false,"pushed_at":"2023-11-15T09:26:16.000Z","size":32,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-06T06:46:16.132Z","etag":null,"topics":["axon","elixir","nx"],"latest_commit_sha":null,"homepage":"","language":null,"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/ndrean.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-11T09:44:45.000Z","updated_at":"2024-11-25T15:26:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"971012a8-6955-4473-a420-fed335d8749c","html_url":"https://github.com/ndrean/linear_regression_nx_axon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndrean%2Flinear_regression_nx_axon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndrean%2Flinear_regression_nx_axon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndrean%2Flinear_regression_nx_axon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndrean%2Flinear_regression_nx_axon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ndrean","download_url":"https://codeload.github.com/ndrean/linear_regression_nx_axon/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246402583,"owners_count":20771341,"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":["axon","elixir","nx"],"created_at":"2024-10-03T22:24:45.258Z","updated_at":"2025-03-31T01:27:04.774Z","avatar_url":"https://github.com/ndrean.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# linear_regression_nx_axon\n\nGoal: learning a bit of `Nx`, numerical functions with `defn` and `Axon`, and how to use `Livebook` and `Vegalite` by playing with linear regression.\n\n\nI take a \"straightforward\" model made of points in the form `(i, i+:rand.uniform)` in a range `1..50`. \nI want to find the coefficients of the best linear fit to this set.\n\n\nI start by calculating the exact solution with `Nx` matrices, in other words by playing with tensors, `transpose` and `LinAlg.inverse`.\nThen I use statistical formulas to run this calculations.\n\nThen approaching the solution with a gradient descent. This time, I use the `.grad` macro. \nSome graphics are added to understand the importance of coefficients.\n\nFinally, a first encounter with `Axon` by using the most basic Neural Network. The activation is `:linear` and the loss is `: mean_squared_error`. It is important to use `compile: EXLA`.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndrean%2Flinear_regression_nx_axon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fndrean%2Flinear_regression_nx_axon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndrean%2Flinear_regression_nx_axon/lists"}