{"id":13691249,"url":"https://github.com/nickgnd/programming-machine-learning-livebooks","last_synced_at":"2025-10-12T06:53:51.412Z","repository":{"id":148505225,"uuid":"574557626","full_name":"nickgnd/programming-machine-learning-livebooks","owner":"nickgnd","description":"Programming Machine Learning - Elixir Livebooks ","archived":false,"fork":false,"pushed_at":"2023-06-02T13:27:18.000Z","size":13542,"stargazers_count":202,"open_issues_count":2,"forks_count":19,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-09-21T02:21:52.465Z","etag":null,"topics":["deep-learning","elixir","livebook","machine-learning","neural-network","nx"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/nickgnd.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-12-05T15:15:40.000Z","updated_at":"2025-09-15T08:16:09.000Z","dependencies_parsed_at":"2024-04-08T02:05:18.360Z","dependency_job_id":null,"html_url":"https://github.com/nickgnd/programming-machine-learning-livebooks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nickgnd/programming-machine-learning-livebooks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickgnd%2Fprogramming-machine-learning-livebooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickgnd%2Fprogramming-machine-learning-livebooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickgnd%2Fprogramming-machine-learning-livebooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickgnd%2Fprogramming-machine-learning-livebooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nickgnd","download_url":"https://codeload.github.com/nickgnd/programming-machine-learning-livebooks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickgnd%2Fprogramming-machine-learning-livebooks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010543,"owners_count":26084758,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["deep-learning","elixir","livebook","machine-learning","neural-network","nx"],"created_at":"2024-08-02T17:00:42.432Z","updated_at":"2025-10-12T06:53:51.351Z","avatar_url":"https://github.com/nickgnd.png","language":"Elixir","funding_links":[],"categories":["Livebooks \u0026 Examples"],"sub_categories":["Development Tools"],"readme":"# Programming Machine Learning: From Coding to Deep Learning - Elixir Livebooks\n\n\u003e Last year (2022), one of my New Year's resolutions was to get into Machine Learning. So, I grabbed a digital copy of this book called [\"Programming Machine Learning\"](https://pragprog.com/titles/pplearn/programming-machine-learning/) book by [P. Perrotta](https://github.com/nusco) and started my journey. It took a bit longer than I expected, but it was totally worth it in the end.\n\n![livebooks home](./images/livebooks_home.png)\n\n[Programming Machine Learning](https://pragprog.com/titles/pplearn/programming-machine-learning/) is an hands-on book, it guides you through the creation of an image recognition application from scratch with supervised learning, iteratevely and step-by-step.\n\nAll the code examples are in Python/numpy (see [Source Code](https://pragprog.com/titles/pplearn/programming-machine-learning/#resources)), but I decided to give Elixir a spin using Livebook, Nx and company.\n\n## Repository Structure\n\nThe repository contains different Livebooks, around one per chapter, and each of them mirrors the corresponding Jupyter Book in the [Source Code](https://pragprog.com/titles/pplearn/programming-machine-learning/#resources) provided with the book.\n\n## Prerequisites\n\n* Erlang and Elixir (https://elixir-lang.org/install.html)\n\nI personally tested it with:\n\n* erlang 25.1.2\n* elixir 1.14.2-otp-25\n\n### Livebook\n\nYou can install and run [Livebook](https://livebook.dev) in different ways:\n\n* The most convenient one is to download the Livebook Desktop App (https://livebook.dev/#install)\n\nOtherwise:\n\n* via [Docker](https://github.com/livebook-dev/livebook#docker) (the repository has a `docker-compose.yml` file already)\n* using [Escript](https://github.com/livebook-dev/livebook#escript) which comes with a convenient CLI\n\n## How to run the livebooks?\n\n* Git clone the repository in your local machine, then:\n\nIf you have the Livebook Desktop App installed locally:\n\n* Launch the app and navigate to the cloned repo locally, select one of the livebook and click on the \"Open\" button.\n\nIf you installed Livebook via Escript:\n\n* run `livebook server --home \u003c/path/to/the/repo\u003e` (the `home` option will launch Livebook in the repository root folder), then select one of the livebook and click on the \"Open\" button.\n\nIf you want to launch Livebook via Docker:\n\n* run `docker-compose up`, it will launch Livebook in the repository root folder, then select one of the livebook and click on the \"Open\" button.\n\n## Additional notes\n\n### Differences between Livebook an Jupyter books\n\n* I could replicate all the different Jupyter books in Elixir with Livebook/Nx/Axon, apart from the 2nd section of Chapter 17, where the book introduces L1/L2 regularization techniques and these are not supported by [Axon](https://github.com/elixir-nx/axon) out of the box (more details in the corresponding Livebook).\n\n### Code Style\n\n* The Elixir code style used in the Livebooks is not the most idiomatic one because I aimed to keep it similar and comparable to the Python code in the Jupiter Book.\n\n## Acknowledgements\n\n* First, I want to thank [@nusco](https://github.com/nusco) for the well-written and entertaining book. It has been a pleasant reading and I can only recommend it.\n* Then, I want to give a huge shoutout to the elixir-nx and Livebook teams (and contribuitors) for their incredible achievements in less than two years! I'm absolutely blown away by the ecosystem of libraries they've created to make Elixir a possible alternative to the more popular languages in the ML field. The ecosystem is evolving fast and I'm genuily curious to see what the future will bring!\n\n## Contributing\n\nContributions are welcome! Feel free to open an issue or PR if something is not working as expected or if you see possible improvements ☺️.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickgnd%2Fprogramming-machine-learning-livebooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnickgnd%2Fprogramming-machine-learning-livebooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickgnd%2Fprogramming-machine-learning-livebooks/lists"}