@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | /** |
| 140 | 140 | * @param array $records |
| 141 | 141 | * |
| 142 | - * @return DecisionTreeLeaf[] |
|
| 142 | + * @return null|DecisionTreeLeaf |
|
| 143 | 143 | */ |
| 144 | 144 | protected function getBestSplit($records) |
| 145 | 145 | { |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | /** |
| 269 | 269 | * @param array $sample |
| 270 | 270 | * |
| 271 | - * @return mixed |
|
| 271 | + * @return string |
|
| 272 | 272 | */ |
| 273 | 273 | protected function predictSample(array $sample) |
| 274 | 274 | { |
@@ -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 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Phpml\Clustering; |
| 6 | 6 | |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | $row[] = $val; |
| 95 | 95 | $total += $val; |
| 96 | 96 | } |
| 97 | - $this->membership[] = array_map(function ($val) use ($total) { |
|
| 97 | + $this->membership[] = array_map(function($val) use ($total) { |
|
| 98 | 98 | return $val / $total; |
| 99 | 99 | }, $row); |
| 100 | 100 | } |
@@ -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\Preprocessing; |
| 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; |
| 6 | 6 | |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | $this->dataType[$label][$i] = self::NOMINAL; |
| 102 | 102 | $this->discreteProb[$label][$i] = array_count_values($values); |
| 103 | 103 | $db = &$this->discreteProb[$label][$i]; |
| 104 | - $db = array_map(function ($el) use ($numValues) { |
|
| 104 | + $db = array_map(function($el) use ($numValues) { |
|
| 105 | 105 | return $el / $numValues; |
| 106 | 106 | }, $db); |
| 107 | 107 | } 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\Classification\DecisionTree; |
| 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\FeatureExtraction; |
| 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\Math\Distance; |
| 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\Math\Statistic; |
| 6 | 6 | |