Rustml
Rustml is a library for doing machine learning in Rust.
The documentation of the project can be found here.
Features
- powerful matrix and vector support with BLAS bindings for high performance
- classification with k-nearest neighbord
- easy access to MNIST database of handwritten digits
- parse and create CSV files
- statistical functions like mean and variance for vectors and matrices
- reading gzip compressed files
- distance metrics
Using rustml - example matrix multplication
Create a new project with cargo:
A new directory example
is created. Change into this directory and add the following lines Cargo.toml
:
[dependencies.rustml]
git = "https://github.com/daniel-e/rustml/"
or the following dependency:
[dependencies]
rustml = "*"
Edit the file main.rs
in the src
directory.
extern crate rustml;
use *;
Now, in the example
directory run the example with cargo run
.
Other examples
You can find other examples in the directory examples
. These examples can be executed with
Cargo as follows:
Datasets
Rustml comes with the MNIST database of handwritten digits and provides an API to access this database. In prior to use the dataset you have to install it into you home path. This can be easily done as follows:
# download the install script
# download the datasets and install them into ~/.rustml/