PHP Machine Learning library
Go to file
2016-05-02 12:07:53 +02:00
data add glass identification dataset 2016-04-09 15:46:54 +02:00
docs update classifier docs 2016-04-16 21:41:37 +02:00
src/Phpml refactor kmeans subclasses 2016-05-01 23:36:33 +02:00
tests/Phpml test kmeans init methods 2016-05-01 23:44:04 +02:00
tools create php-cs-fixer start script 2016-04-04 22:50:14 +02:00
.gitignore create composer file 2016-02-08 21:54:09 +01:00
.travis.yml fix travis build 2016-04-10 11:56:11 +02:00
composer.json change autoloader to psr-0 2016-04-08 21:37:26 +02:00
composer.lock update composer 2016-04-07 23:25:02 +02:00
LICENSE create some text in readme 2016-02-08 23:07:16 +01:00
mkdocs.yml update classifier docs 2016-04-16 21:41:37 +02:00
phpunit.xml create phpunit configuration and first tests 2016-04-04 22:38:51 +02:00
README.md add example code to readme 2016-05-02 12:07:53 +02:00

PHP Machine Learning library

Build Status Documentation Status Total Downloads License Scrutinizer Code Quality

Fresh approach to Machine Learning in PHP. Note that at the moment PHP is not the best choice for machine learning but maybe this will change ...

Simple example of classification:

use Phpml\Classifier\KNearestNeighbors;

$samples = [[1, 3], [1, 4], [2, 4], [3, 1], [4, 1], [4, 2]];
$labels = ['a', 'a', 'a', 'b', 'b', 'b'];

$classifier = new KNearestNeighbors();
$classifier->train($samples, $labels);

$classifier->predict([3, 2]); 
// return 'b'

Documentation

To find out how to use PHP-ML follow Documentation.

Installation

Currently this library is in the process of developing, but You can install it with Composer:

composer require php-ai/php-ml

Features

  • Classification
  • Regression
  • Clustering
  • Cross Validation

Contribute

  • Issue Tracker: github.com/php-ai/php-ml/issues
  • Source Code: github.com/php-ai/php-ml

After installation, you can launch the test suite in project root directory (you will need to install dev requirements with Composer)

bin/phpunit

License

PHP-ML is released under the MIT Licence. See the bundled LICENSE file for details.

Author

Arkadiusz Kondas (@ArkadiuszKondas)