+
96
-

回答

PHP-ml 是 PHP 的机器学习库。同时包含算法,交叉验证,神经网络,预处理,特征提取等。
(php真实强大的语言,php-ml要求 php版本 大于7.0,速度很快,赶紧去升级吧)
别问我为什么用PHP 来做机器学习库,不用有成熟python机器库,没为什么,就因为熟悉PHP;
PHP-ml有基本的机器学习和算法,用来学习足够了。
github : https://github.com/php-ai/php-ml
可直接下载部署,建议用composer 安装,自动配置。
composer require php-ai/php-ml
文档地址:http://php-ml.readthedocs.io/en/latest/
PHP-ML 要求 PHP >= 7.0。
可应用的算法功能:
关联规则式学习
Apriori
分类
Adaline
Decision Stump
Perceptron
Bagging (Bootstrap Aggregating)
Random Forest
AdaBoost
SVC
k-Nearest Neighbors
Naive Bayes
Decision Tree (CART)
Ensemble Algorithms
Linear
回归
Least Squares
SVR
聚合
k-Means
DBSCAN
Metric
Accuracy
Confusion Matrix
Classification Report
工作流
Pipeline
神经网络
Multilayer Perceptron
Backpropagation training
交叉验证
Random Split
Stratified Random Split
预处理
Normalization
Imputation missing values
特征提取
Token Count Vectorizer
Tf-idf Transformer
数据设置
Iris
Wine
Glass
Array
CSV
Files
Ready to use:
模式管理
Persistency
Math
Distance
Matrix
Set
Statistic
示例
简单的分类示例:
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);
$classifier->predict([3, 2]);
// return 'b'
这是官方文档首页给的第一个例子,用的是 KNearestNeighbors类,看了下手册,大概是分类器的作用,默认Euclidean算法
通过简单的算法,计算预测出你给的值的归类
KNearestNeighbors主要应用领域:
文本分类、聚类分析、预测分析、模式识别、图像处理等等。
下面本人整理了一些PHP人工智能库:

1.NLPTools(http://php-nlp-tools.com/)
NLPTools是一个PHP自然语言处理库.能进行文本分级,聚类等操作.

2.Prediction Builder(https://github.com/denissimon/prediction-builder)
一个用PHP写成的机器学习预测库,使用了线性回归算法.

3.AIML(http://www.alicebot.org/aiml.html)
AIML是用于搭建聊天机器人平台的标记语言,可被PHP调用.

4.PHP Classifier(https://github.com/Dachande663/PHP-Classifier)
PHP朴素贝叶斯分类库.

5.PHP–FANN(https://github.com/bukka/php-fann)
PHP人工神经网络库.

6.ANN(http://ann.thwien.de/index.php?title=Main_Page)
PHP人工神经网络库.

7.PHP–ML(https://github.com/php-ai/php-ml)
PHP机器学习库,可进行支持向量机,神经网络等操作。

网友回复

我知道答案,我要回答