Skip to content
PHP-ML - Machine Learning library for PHP
PHP
Branch: master
Clone or download

Latest commit

Latest commit aae3005 May 15, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Update phpunit to 7.5.1 and remove osx build from travis (#335) Dec 18, 2018
data add glass identification dataset Apr 9, 2016
docs Make grammar a little more natural (#411) Nov 14, 2019
src Added Russian stopwords (#425) Mar 4, 2020
tests Fix static analysis errors from phpstan upgrade to 0.12 (#426) Mar 3, 2020
var start to implement SVM with libsvm May 5, 2016
.editorconfig Issue #355: Add a .editorconfig file. (#356) Feb 10, 2019
.gitattributes Add .gitattributes (#287) Jun 25, 2018
.gitignore Update to phpunit 8 and bump min php to 7.2 (#367) Apr 10, 2019
.travis.yml Add php 7.4 for travis build (#393) Dec 16, 2019
CHANGELOG.md Release 0.9.0 (#432) May 15, 2020
CONTRIBUTING.md Add performance test for LeastSquares (#263) Mar 10, 2018
LICENSE Release 0.9.0 (#432) May 15, 2020
README.md Implement OneHotEncoder (#384) May 15, 2019
composer.json Update phpstan to 0.12 (#419) Jan 27, 2020
composer.lock Fix static analysis errors from phpstan upgrade to 0.12 (#426) Mar 3, 2020
ecs.yml Update phpunit, phpbench, easy coding standard (#415) Nov 8, 2019
mkdocs.yml Mnist Dataset (#326) Nov 7, 2018
phpbench.json Add performance test for LeastSquares (#263) Mar 10, 2018
phpstan.neon Fix static analysis errors from phpstan upgrade to 0.12 (#426) Mar 3, 2020
phpunit.xml Remove enforceTimeLimit flag from phpunit and update dependencies (#328) Nov 7, 2018

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

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.2.

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'

Awards

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.

Datasets

Public datasets are available in a separate repository php-ai/php-ml-datasets.

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.