Coder Social home page Coder Social logo

lcmen / programming-machine-learning-livebooks Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nickgnd/programming-machine-learning-livebooks

0.0 0.0 0.0 13.21 MB

Programming Machine Learning - Elixir Livebooks

License: MIT License

Elixir 100.00%

programming-machine-learning-livebooks's Introduction

Programming Machine Learning: From Coding to Deep Learning - Elixir Livebooks

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" book by P. Perrotta and started my journey. It took a bit longer than I expected, but it was totally worth it in the end.

livebooks home

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.

All the code examples are in Python/numpy (see Source Code), but I decided to give Elixir a spin using Livebook, Nx and company.

Repository Structure

The repository contains different Livebooks, around one per chapter, and each of them mirrors the corresponding Jupyter Book in the Source Code provided with the book.

Prerequisites

I personally tested it with:

  • erlang 25.1.2
  • elixir 1.14.2-otp-25

Livebook

You can install and run Livebook in different ways:

Otherwise:

  • via Docker (the repository has a docker-compose.yml file already)
  • using Escript which comes with a convenient CLI

How to run the livebooks?

  • Git clone the repository in your local machine, then:

If you have the Livebook Desktop App installed locally:

  • Launch the app and navigate to the cloned repo locally, select one of the livebook and click on the "Open" button.

If you installed Livebook via Escript:

  • run livebook server --home </path/to/the/repo> (the home option will launch Livebook in the repository root folder), then select one of the livebook and click on the "Open" button.

If you want to launch Livebook via Docker:

  • 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.

Additional notes

Differences between Livebook an Jupyter books

  • 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 tecniques and these are not supported by Axon out of the box (more details in the corresponding Livebook).

Code Style

  • 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.

Acknowledgements

  • First, I want to thank @nusco for the well-written and entertaining book. It has been a pleasant reading and I can only recommend it.
  • 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!

Contributing

Contributions are welcome! Feel free to open an issue or PR if something is not working as expected or if you see possible improvements ☺️.

programming-machine-learning-livebooks's People

Contributors

nickgnd avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.