@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Phpml\Classification; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Phpml\Helper; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Phpml; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | /** |
| 5 | 5 | * @package JAMA |
| 6 | 6 | * |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | /** |
| 5 | 5 | * |
| 6 | 6 | * Class to obtain eigenvalues and eigenvectors of a real matrix. |
@@ -838,7 +838,7 @@ discard block |
||
| 838 | 838 | |
| 839 | 839 | // Always return the eigenvectors of length 1.0 |
| 840 | 840 | $vectors = new Matrix($vectors); |
| 841 | - $vectors = array_map(function ($vect) { |
|
| 841 | + $vectors = array_map(function($vect) { |
|
| 842 | 842 | $sum = 0; |
| 843 | 843 | for ($i = 0; $i < count($vect); ++$i) { |
| 844 | 844 | $sum += $vect[$i] ** 2; |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Phpml\Math\Statistic; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Phpml\Math; |
| 6 | 6 | |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | public function transpose() |
| 158 | 158 | { |
| 159 | 159 | if ($this->rows == 1) { |
| 160 | - $matrix = array_map(function ($el) { |
|
| 160 | + $matrix = array_map(function($el) { |
|
| 161 | 161 | return [$el]; |
| 162 | 162 | }, $this->matrix[0]); |
| 163 | 163 | } else { |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Phpml\DimensionReduction; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Phpml\Classification\Linear; |
| 6 | 6 | |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | protected function runTraining(array $samples, array $targets) |
| 171 | 171 | { |
| 172 | 172 | // The cost function is the sum of squares |
| 173 | - $callback = function ($weights, $sample, $target) { |
|
| 173 | + $callback = function($weights, $sample, $target) { |
|
| 174 | 174 | $this->weights = $weights; |
| 175 | 175 | |
| 176 | 176 | $prediction = $this->outputClass($sample); |