PHP的数学统计库

Seb*_*eck 6 php statistics

我想知道,如果有一个统计测试的库,比如-t-test - Anova测试 - Kolmogorov Smirnov等.....用于PHP?

我找到了一个pecl扩展名:http://php.net/manual/de/book.stats.php ,它提供了一些基本参数,但还没有找到测试

art*_*gis 3

如果你想要一个完整的 PHP 库,你可以看看这里,但我不知道它是否真的很好。

这个统计测试非常糟糕,我不知道 php 是否是计算它的好选择。正如评论中所建议的,您应该用 R 语言编写脚本,然后调用它。根据您的服务器架构,有两种方法可以调用另一种语言。假设您只有一台服务器,您可以使用proc_open

$descriptorspec = array(
   0 => array("pipe", "r"),  //a pipe where you will read
   1 => array("pipe", "w"),  //std out : a pipe where you will write
   2 => array("file", "/tmp/error-output.txt", "a") // stderr : a log file, not mandatory here
);
 $pipes = array();
$process = proc_open('R yourfile.r',$decriptorspec,$pipes);

fwrite($pipes[0],$yourStatsToBeCompute);
$result = stream_get_contents($pipes[1]);
fclose($pipes[0]);
fclose($pipes[1]);
proc_close($process);
Run Code Online (Sandbox Code Playgroud)

您还可以使用 cURL 通过 RCurl 联系另一台服务器上的 Rscript。