Git Product home page Git Product logo

book's Introduction

The Rust Machine Learning Book

This repository contains the source of "The Rust Machine Learning Book".

Purpose

The aim of this book is to demonstrate how the Rust language can be used for Machine Learning tasks. They encompass classical ML algorithms, like linear regression and KMeans clustering, but also more modern approaches. Most of the classical algorithms are contained in the rust-ml/linfa crate and ready to use.

Audience

The reader should have a basic knowledge of Rust type-system and linear algebra. A small recap on rust-ndarray type system should familiarize the reader with its applications and limitations.

Requirements

Building this book requires mdBook.

$ cargo install mdbook

Building

You can build the book with

$ mdbook build

and append

$ mdbook build --open
# 
$ mdbook serve

in order to open it afterwards.

Code samples are contained in the examples/ directory, and can be built as a group or individually using:

$ cargo build --all
# or
$ cargo run --example name_of_algorithm

By default, all plots will be written to the target/ directory, so as not to be indexed by git.

book's People

Contributors

bytesnake avatar liufuyang avatar quietlychris avatar zenhob avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

book's Issues

All-The-Content

The rust-ml group is still in its infancy, but these are already available:

  • linear decision trees
  • non-linear manifolds
  • linear regression
  • a Torch model, for example CIFA-10 dataset with CNN

We should also have an introduction to, not only the algorithms, but also the tools we are using:

  • How to use the ndarray crate and understand type signatures of ArrayBase
  • Give examples for ndarray-stats
  • Integration of gnuplot into the workflow

This list is far from complete and will grow with time. If you know any algorithm, you want to add, please feel free to contribute.

sha256 wrong apis in 0.9.3

/// Convert input string to 24 character hash
pub fn hash(input: &str) -> String {
let mut sh = Sha256::new();
sh.input(input.as_bytes());
let mut out = format!("{:x}", sh.result());
out.truncate(24);
out
}

Does not build, input and result are not registered apis

changed to
/// Convert input string to 24 character hash
pub fn hash(input: &str) -> String {
let mut sh = Sha256::new();
sh.update(input.as_bytes());
let mut out = format!("{:x}", sh.finalize());
out.truncate(24);
out
}

Update to latest linfa and plotters versions

Now that linfa 0.6 has been released, which does not require a BLAS dependency, it should be much easier for users to get started with using it. This book should be updated to the 0.6 release, and specify the 0.3.1 release of plottersfor generating plots.

Multilingual support

We should think of a way to add multiple languages in the book. The easiest option would add a separate mdbook for each language and publish each of them separately.

Relevant issue rust-lang/mdBook#5

Add CI system and integrate into pages

We should build and publish the book automatically to rust-ml.github.io/book on each push:

  • add small CI system which builds the book
  • add gh branch with artifacts

Avoid parsing inline equations in code blocks

At the moment this code snippets

user@computer:~/rust-ml/book$ cd code/
user@computer:~/rust-ml/book/code$ cargo run --release --example kmeans

is parsed with the dollar symbols as inline equations.

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.