PHP Machine Learning library
Go to file
Tomáš Votruba a348111e97 Add PHPStan and level to max (#168)
* tests: update to PHPUnit 6.0 with rector

* fix namespaces on tests

* composer + tests: use standard test namespace naming

* update travis

* resolve conflict

* phpstan lvl 2

* phpstan lvl 3

* phpstan lvl 4

* phpstan lvl 5

* phpstan lvl 6

* phpstan lvl 7

* level max

* resolve conflict

* [cs] clean empty docs

* composer: bump to PHPUnit 6.4

* cleanup

* composer + travis: add phpstan

* phpstan lvl 1

* composer: update dev deps

* phpstan fixes

* update Contributing with new tools

* docs: link fixes, PHP version update

* composer: drop php-cs-fixer, cs already handled by ecs

* ecs: add old set rules

* [cs] apply rest of rules
2018-01-06 13:09:33 +01:00
bin Add support for coveralls.io (#153) 2017-11-15 11:08:51 +01:00
data add glass identification dataset 2016-04-09 15:46:54 +02:00
docs Add PHPStan and level to max (#168) 2018-01-06 13:09:33 +01:00
src/Phpml Add PHPStan and level to max (#168) 2018-01-06 13:09:33 +01:00
tests/Phpml Add PHPStan and level to max (#168) 2018-01-06 13:09:33 +01:00
var start to implement SVM with libsvm 2016-05-05 23:29:11 +02:00
.gitignore Added EasyCodingStandard + lots of code fixes (#156) 2017-11-22 22:16:10 +01:00
.travis.yml Add PHPStan and level to max (#168) 2018-01-06 13:09:33 +01:00
CHANGELOG.md Update changelog (#152) 2017-11-14 21:40:46 +01:00
CONTRIBUTING.md Add PHPStan and level to max (#168) 2018-01-06 13:09:33 +01:00
LICENSE create some text in readme 2016-02-08 23:07:16 +01:00
README.md Update README.md (#181) 2018-01-06 11:12:42 +01:00
composer.json Add PHPStan and level to max (#168) 2018-01-06 13:09:33 +01:00
composer.lock Add PHPStan and level to max (#168) 2018-01-06 13:09:33 +01:00
easy-coding-standard.neon Add PHPStan and level to max (#168) 2018-01-06 13:09:33 +01:00
humbug.json.dist add config for humbug - mutation test framework 2016-05-03 12:35:57 +02:00
mkdocs.yml Neural networks improvements (#89) 2017-05-18 00:07:14 +02:00
phpstan.neon Add PHPStan and level to max (#168) 2018-01-06 13:09:33 +01:00
phpunit.xml Added EasyCodingStandard + lots of code fixes (#156) 2017-11-22 22:16:10 +01:00

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)