PHP-ML - Machine Learning library for PHP

68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e312d3838393242462e737667

68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7068702d61692f7068702d6d6c2e737667

68747470733a2f2f7472617669732d63692e6f72672f7068702d61692f7068702d6d6c2e7376673f6272616e63683d6d6173746572

68747470733a2f2f72656164746865646f63732e6f72672f70726f6a656374732f7068702d6d6c2f62616467652f3f76657273696f6e3d6d6173746572

68747470733a2f2f706f7365722e707567782e6f72672f7068702d61692f7068702d6d6c2f646f776e6c6f6164732e737667

68747470733a2f2f706f7365722e707567782e6f72672f7068702d61692f7068702d6d6c2f6c6963656e73652e737667

68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f7068702d61692f7068702d6d6c2f62616467652e7376673f6272616e63683d6d6173746572

68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7068702d61692f7068702d6d6c2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572

php-ml-logo.png

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

449fa9111200938b8a4ccc70484a2e81.png

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

Association rule learning

Classification

Decision Tree (CART)

Ensemble Algorithms

Bagging (Bootstrap Aggregating)

Random Forest

AdaBoost

Linear

Adaline

Decision Stump

Perceptron

LogisticRegression

Clustering

Fuzzy C-Means

Workflow

Dimensionality Reduction

PCA (Principal Component Analysis)

Kernel PCA

LDA (Linear Discriminant Analysis)

Models management

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)

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐