mirror of
https://github.com/Llewellynvdm/php-ml.git
synced 2024-05-28 06:00:50 +00:00
19 lines
253 B
PHP
19 lines
253 B
PHP
<?php
|
|
|
|
declare (strict_types = 1);
|
|
|
|
namespace Phpml\Math\Statistic;
|
|
|
|
class Mean
|
|
{
|
|
/**
|
|
* @param array $a
|
|
*
|
|
* @return float
|
|
*/
|
|
public static function arithmetic(array $a)
|
|
{
|
|
return array_sum($a) / count($a);
|
|
}
|
|
}
|