Rubix ML logo Rubix ML: Machine Learning for PHP

A high-level machine learning and deep learning library for the PHP language.

  • Developer-friendly API is easy and delightful to use
  • Modular architecture combines power, flexibility, and extensibility
  • 40+ modern supervised and unsupervised learning algorithms
  • Open source and free to use commercially


Install Rubix ML into your project using Composer:

$ composer require rubix/ml


  • PHP 7.2 or above


What is Rubix ML?#

Rubix ML is a free open-source library for the PHP language that allows you to build programs that learn from your data. We provide tools for the entire machine learning life cycle from ETL to training, validation, and production with over 40 supervised and unsupervised learning algorithms.

Getting Started#

If you are new to machine learning, we recommend the section What is Machine Learning? to get started. If you are already familiar with basic ML concepts, you can browse the basic introduction for a brief look at a typical Rubix ML project. From there, you can browse the official tutorials below which range from beginner to advanced skill level.

Tutorials & Example Projects#

Check out these example projects using the Rubix ML library. Most come with instructions and a pre-cleaned dataset.


Rubix ML is funded entirely by donations from the community. You can become a sponsor by making a contribution to one of our funding sources below.


See for guidelines.