mirror of
https://github.com/Llewellynvdm/php-ml.git
synced 2024-06-07 02:50:48 +00:00
Update php-cs-fixer
This commit is contained in:
parent
bca2196b57
commit
cbdc049526
|
@ -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
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ class StandardDeviation
|
|||
foreach ($a as $val) {
|
||||
$d = $val - $mean;
|
||||
$carry += $d * $d;
|
||||
};
|
||||
}
|
||||
|
||||
if ($sample) {
|
||||
--$n;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -78,8 +78,7 @@ class ClassificationReportTest extends \PHPUnit_Framework_TestCase
|
|||
$this->assertEquals([
|
||||
'precision' => 0,
|
||||
'recall' => 0,
|
||||
'f1score' => 0
|
||||
'f1score' => 0,
|
||||
], $report->getAverage(), '', 0.01);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user