PHP Machine Learning library
Go to file
2018-06-25 23:19:13 +02:00
bin Update osx build for travis (#281) 2018-06-14 07:53:33 +02:00
data add glass identification dataset 2016-04-09 15:46:54 +02:00
docs Change the default kernel type in SVC to Kernel::RBF (#267) 2018-06-20 23:28:11 +02:00
src Change the default kernel type in SVC to Kernel::RBF (#267) 2018-06-20 23:28:11 +02:00
tests Update to EasyCodingStandard 4 (#273) 2018-06-15 07:57:45 +02:00
var start to implement SVM with libsvm 2016-05-05 23:29:11 +02:00
.gitattributes Add .gitattributes (#287) 2018-06-25 23:19:13 +02:00
.gitignore Add performance test for LeastSquares (#263) 2018-03-10 21:48:16 +01:00
.travis.yml Update osx build for travis (#281) 2018-06-14 07:53:33 +02:00
CHANGELOG.md Change the default kernel type in SVC to Kernel::RBF (#267) 2018-06-20 23:28:11 +02:00
composer.json Update to EasyCodingStandard 4 (#273) 2018-06-15 07:57:45 +02:00
composer.lock Update to EasyCodingStandard 4 (#273) 2018-06-15 07:57:45 +02:00
CONTRIBUTING.md Add performance test for LeastSquares (#263) 2018-03-10 21:48:16 +01:00
ecs.yml Update to EasyCodingStandard 4 (#273) 2018-06-15 07:57:45 +02:00
LICENSE Update license year (#183) 2018-01-07 10:57:14 +01:00
mkdocs.yml Add a SvmDataset class for SVM-Light (or LibSVM) format files (#237) 2018-02-24 11:17:35 +01:00
phpbench.json Add performance test for LeastSquares (#263) 2018-03-10 21:48:16 +01:00
phpstan.neon Add phpstan strict rules (#233) 2018-02-16 07:25:24 +01:00
phpunit.xml Fix: phpunit include tests path (#230) 2018-02-11 18:17:50 +01:00
README.md Add performance test for LeastSquares (#263) 2018-03-10 21:48:16 +01:00

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

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)