@@ -128,7 +128,7 @@ |
||
128 | 128 | } |
129 | 129 | |
130 | 130 | /** |
131 | - * @return mixed |
|
131 | + * @return integer |
|
132 | 132 | */ |
133 | 133 | public function count() |
134 | 134 | { |
@@ -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\Clustering\KMeans; |
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 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Phpml\Association; |
6 | 6 | |
@@ -107,11 +107,11 @@ discard block |
||
107 | 107 | */ |
108 | 108 | protected function predictSample(array $sample) : array |
109 | 109 | { |
110 | - $predicts = array_values(array_filter($this->getRules(), function ($rule) use ($sample) { |
|
110 | + $predicts = array_values(array_filter($this->getRules(), function($rule) use ($sample) { |
|
111 | 111 | return $this->equals($rule[self::ARRAY_KEY_ANTECEDENT], $sample); |
112 | 112 | })); |
113 | 113 | |
114 | - return array_map(function ($rule) { |
|
114 | + return array_map(function($rule) { |
|
115 | 115 | return $rule[self::ARRAY_KEY_CONSEQUENT]; |
116 | 116 | }, $predicts); |
117 | 117 | } |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | $cardinality = count($sample); |
180 | 180 | $antecedents = $this->powerSet($sample); |
181 | 181 | |
182 | - return array_filter($antecedents, function ($antecedent) use ($cardinality) { |
|
182 | + return array_filter($antecedents, function($antecedent) use ($cardinality) { |
|
183 | 183 | return (count($antecedent) != $cardinality) && ($antecedent != []); |
184 | 184 | }); |
185 | 185 | } |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | } |
202 | 202 | } |
203 | 203 | |
204 | - return array_map(function ($entry) { |
|
204 | + return array_map(function($entry) { |
|
205 | 205 | return [$entry]; |
206 | 206 | }, $items); |
207 | 207 | } |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | */ |
216 | 216 | private function frequent(array $samples) : array |
217 | 217 | { |
218 | - return array_filter($samples, function ($entry) { |
|
218 | + return array_filter($samples, function($entry) { |
|
219 | 219 | return $this->support($entry) >= $this->support; |
220 | 220 | }); |
221 | 221 | } |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | */ |
296 | 296 | private function frequency(array $sample) : int |
297 | 297 | { |
298 | - return count(array_filter($this->samples, function ($entry) use ($sample) { |
|
298 | + return count(array_filter($this->samples, function($entry) use ($sample) { |
|
299 | 299 | return $this->subset($entry, $sample); |
300 | 300 | })); |
301 | 301 | } |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | */ |
313 | 313 | private function contains(array $system, array $set) : bool |
314 | 314 | { |
315 | - return (bool) array_filter($system, function ($entry) use ($set) { |
|
315 | + return (bool) array_filter($system, function($entry) use ($set) { |
|
316 | 316 | return $this->equals($entry, $set); |
317 | 317 | }); |
318 | 318 | } |
@@ -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\Association; |
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\StopWords; |
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\Exception; |
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\Dataset\Demo; |
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\Dataset; |
6 | 6 |