Skip to content
PHP-ML - Machine Learning library for PHP
PHP Shell
Branch: master
Clone or download
Pull request Compare This branch is 74 commits behind php-ai:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
data
docs
src
tests
var
.gitignore
.travis.yml
CHANGELOG.md
CONTRIBUTING.md
LICENSE
README.md
composer.json
composer.lock
easy-coding-standard.neon
mkdocs.yml
phpstan.neon
phpunit.xml

README.md

PHP-ML - Machine Learning library for PHP

Minimum PHP Version Latest Stable Version Build Status Documentation Status Total Downloads License Coverage Status Scrutinizer Code Quality

PHP-ML - Machine Learning library for PHP

Fresh approach to Machine Learning in PHP. Algorithms, Cross Validation, Neural Network, Preprocessing, Feature Extraction and much more in one library.

PHP-ML requires PHP >= 7.1.

Simple example of classification:

require_once __DIR__ . '/vendor/autoload.php';

use Phpml\Classification\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);

echo $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 being developed, but You can install it with Composer:

composer require php-ai/php-ml

Examples

Example scripts are available in a separate repository php-ai/php-ml-examples.

Features

Contribute

You can find more about contributing in CONTRIBUTING.md.

License

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

Author

Arkadiusz Kondas (@ArkadiuszKondas)

You can’t perform that action at this time.