Rusty Machine- Machine Learning in Rust

Oct. 7, 2017, 8:51 a.m. By: Kirti Bakshi

Rusty Machine

Rusty-machine, an Open Source Project is a general purpose machine learning library that is Implemented entirely in Rust and is only 6 months old, with its Development sponsored by Mozilla and crate currently on version 0.5.4.

Rusty-machine provides a consistent, high-level API for users and aims to combine speed and ease of use without a huge number of any external dependencies- and this consistency is achieved through Rust’s trait system.

This project also provides a complete, easy, machine learning library for Rust. Though this library is still in a very early stage of development, there are a good number of algorithms and many other things that are missing.

Implementation and Progress:

This project is implemented using Rust and as of now, there are no other dependencies. Though, it is planned that optional BLAS/LAPACK will be introduced soon.

The machine currently uses rulinalg for its linear algebra back end and is fairly complete but there is still a lot of room for optimization.

The Machine Learning Library:

The machine learning library for Rust consists of two core components. The linear algebra module and learning module and the Specific usage of these modules are described within the modules itself.

1. Linear Algebra Module(linalg):

The linear algebra module consists of the re-exports from the rulinalg crate to provide easy access to components that are used frequently within the rusty-machine.

The techniques that are currently being supported are-

  • Linear Regression

  • Logistic Regression

  • Generalized Linear Models

  • K-Means Clustering

  • Neural Networks

  • Gaussian Process Regression

  • Support Vector Machines

  • Gaussian Mixture Models

  • Naive Bayes Classifiers


All of these aim to provide the benefit of Customization.

2. Learning

This Learning module consists of machine learning models. The machine learning implementations are designed keeping simplicity and customization in mind. This means that you can control the optimization of algorithms but still retain the ease of using default values, an area that is being worked on actively.

Areas of Improvement:

There is definitely more room for improvement on existing algorithms both in terms of performance and introducing some more modern techniques. Provided, that there is also a need for the restructuring of the current library, separation of linear algebra into a new crate and addition of more data tools.

It's still being in its early days shows that a lot of work still needs to be done and the goal of complete flexibility is still to be achieved.

On the contemporary, Consistent data handling, visualizations and performance are all the core areas that need a lot of work. Also, validation and pipelines are something that cannot be missed.

There is also the need to introduce some foreign language libraries as It will be very difficult to match the performance and care that has gone into many scientific libraries: LAPACK, BLAS etc.

So, we can say that Even though all of this looks good, and the vision is strong, a lot of improvement still needs to take place and The Rusty-machine is probably not the best choice for any serious projects but it is expected to soon change in the coming future.

More Information: GitHub