magaras/pstats
Composer 安装命令:
composer require magaras/pstats
包简介
Library that contains statistical methods.
README 文档
README
A PHP library containing a lot of statistical methods, from the most usefull ones (like mean and variance) to even some more sophisticated, like moving average and outliers around median.
I intend to keep updating this library in order for it to be as thorough as possible.
Install with composer composer require magaras/pstats.
The library supports the following methods:
Mean
Basic::mean($data);
** Median**
Basic::median($data);
Mode
Basic::mode($data);
Range
Basic::range($data);
Percentage Change
Basic::percentageChange($start_value, $end_value);
Percentage Difference
Basic::percentageDifference($start_value, $end_value);
Absolute Error
Error::absoluteError(0, 0);
Mean Absolute Error
Error::mae($actuals, $predictions);
Mean Square Error
Error::mse($actuals, $predictions);
Variance (population / sample)
Error::variance($data, true); Error::variance($data, false);
Std
Error::std($data);
Absolute / Relative / Cumulative Frequency for continuous values
$frequency_classes = Frequency::frequencyContinuous($data); $frequency_classes[$i]->absolute_frequency $frequency_classes[$i]->relative_frequency $frequency_classes[$i]->cumulative_frequency
Absolute / Relative / Cumulative Frequency for discrete values
$frequency_classes = Frequency::frequencyDiscrete($data); $frequency_classes[$i]->absolute_frequency $frequency_classes[$i]->relative_frequency $frequency_classes[$i]->cumulative_frequency
Simple Moving Average
MovingAverage::simpleMovingAverage($moving_average_value, $data);
Exponential Moving Average
MovingAverage::exponentialMovingAverage(moving_average_value, $data);
Outliers Around Mean
Outliers::outlierAroundMean($data);
Outliers Around Median
Outliers::outlierAroundMedian($data);
统计信息
- 总下载量: 6.34k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-09-04