Update php-cs-fixer

This commit is contained in:
Arkadiusz Kondas 2016-11-20 22:53:17 +01:00
parent bca2196b57
commit cbdc049526
139 changed files with 160 additions and 159 deletions

View File

@ -3,8 +3,10 @@ CHANGELOG
This changelog references the relevant changes done in PHP-ML library.
* 0.2.1 (in plan/progress)
* 0.2.2 (in plan/progress)
* feature [Regression] - SSE, SSTo, SSR - sum of the squared
* 0.2.1 (2016-11-20)
* feature [Association] - Apriori algorithm implementation
* bug [Metric] - division by zero

View File

@ -33,7 +33,7 @@ class StandardDeviation
foreach ($a as $val) {
$d = $val - $mean;
$carry += $d * $d;
};
}
if ($sample) {
--$n;

View File

@ -20,7 +20,7 @@ class Pipeline implements Estimator
* @param array|Transformer[] $transformers
* @param Estimator $estimator
*/
public function __construct(array $transformers = [], Estimator $estimator)
public function __construct(array $transformers, Estimator $estimator)
{
foreach ($transformers as $transformer) {
$this->addTransformer($transformer);

View File

@ -37,7 +37,7 @@ class Imputer implements Preprocessor
* @param int $axis
* @param array|null $samples
*/
public function __construct($missingValue = null, Strategy $strategy, int $axis = self::AXIS_COLUMN, array $samples = [])
public function __construct($missingValue, Strategy $strategy, int $axis = self::AXIS_COLUMN, array $samples = [])
{
$this->missingValue = $missingValue;
$this->strategy = $strategy;

View File

@ -78,8 +78,7 @@ class ClassificationReportTest extends \PHPUnit_Framework_TestCase
$this->assertEquals([
'precision' => 0,
'recall' => 0,
'f1score' => 0
'f1score' => 0,
], $report->getAverage(), '', 0.01);
}
}