Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
| Date | Stars |
|---|---|
| 2026-07-31 | 323 |
| 2026-08-02 | 323 |
| 2026-08-06 | 323 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# PHP-ML - Machine Learning library for PHP
[](https://php.net/)
[](https://packagist.org/packages/php-ai/php-ml)
[](https://travis-ci.org/php-ai/php-ml)
[](http://php-ml.readthedocs.org/)
[](https://packagist.org/packages/php-ai/php-ml)
[](https://packagist.org/packages/php-ai/php-ml)
[](https://coveralls.io/github/php-ai/php-ml?branch=master)
[](https://scrutinizer-ci.com/g/php-ai/php-ml/?branch=master)
<p align="center">
<img src="https://github.com/php-ai/php-ml/raw/master/docs/assets/php-ml-logo.png" />
</p>
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:
```php
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
<a href="http://www.yegor256.com/2016/10/23/award-2017.html">
<img src="http://www.yegor256.com/images/award/2017/winner-itcraftsmanpl.png" width="400"/></a>
## Documentation
To find out how to use PHP-ML follow [Documentation](http://php-ml.readthedocs.org/).
## 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](https://github.com/php-ai/php-ml-examples).
## Datasets
Public datasets are available in a separate repository [php-ai/php-ml-datasets](https://github.com/php-ai/php-ml-datasets).
## Features
* Association rule learning
* [Apriori](http://php-ml.readthedocs.io/en/latest/machine-learning/association/apriori/)
* Classification
* [SVC](http://php-ml.readthedocs.io/en/latest/machine-learning/classification/svc/)
* [k-Nearest Neighbors](http://php-ml.readthedocs.io/en/latest/machine-learning/classification/k-nearest-neighbors/)
* [Naive Bayes](http://php-ml.readthedocs.io/en/latest/machine-learning/classification/naive-bayes/)
* Decision Tree (CART)
* Ensemble Algorithms
* Bagging (Bootstrap Aggregating)
* Random Forest
* AdaBoost
* Linear
* Adaline
* Decision Stump
* Perceptron
* LogisticRegression
* Regression
* [Least Squares](http://php-ml.readthedocs.io/en/latest/machine-learning/regression/least-squares/)
* [SVR](http://php-ml.readthedocs.io/en/latest/machine-learning/regression/svr/)
* DecisionTreeRegressor
* Clustering
* [k-Means](http://php-ml.readthedocs.io/en/latest/machine-learning/clustering/k-means/)
* [DBSCAN](http://php-ml.readthedocs.io/en/latest/machine-learning/clustering/dbscan/)
* Fuzzy C-Means
* Metric
* [Accuracy](http://php-ml.readthedocs.io/en/latest/machine-learning/metric/accuracy/)
* [Confusion Matrix](http://php-ml.readthedocs.io/en/latest/machine-learning/metric/confusion-matrix/)
* [Classification Report](http://php-ml.readthedocs.io/en/latest/machine-learning/metric/classification-report/)
* Regression
* Workflow
* [Pipeline](http://php-ml.readthedocs.io/en/latest/machinExcerpt of 7,260 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:0b0a006d2bfb209c, llm:Description: 'PHP Machine Learning library' (repo: jorgecasas/php-ml).
matched fp:0b0a006d2bfb209c, llm:Description: 'PHP Machine Learning library' (repo: jorgecasas/php-ml).
matched fp:0b0a006d2bfb209c, llm:Description: 'PHP Machine Learning library' (repo: jorgecasas/php-ml).