@@ -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\NeuralNetwork\ActivationFunction; |
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\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\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\Helper\Optimizer; |
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 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | $total += $val; |
102 | 102 | } |
103 | 103 | |
104 | - $this->membership[] = array_map(function ($val) use ($total) { |
|
104 | + $this->membership[] = array_map(function($val) use ($total) { |
|
105 | 105 | return $val / $total; |
106 | 106 | }, $row); |
107 | 107 | } |
@@ -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 { |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | |
133 | 133 | return $this->discreteProb[$label][$feature][$value]; |
134 | 134 | } |
135 | - $std = $this->std[$label][$feature] ; |
|
135 | + $std = $this->std[$label][$feature]; |
|
136 | 136 | $mean = $this->mean[$label][$feature]; |
137 | 137 | // Calculate the probability density by use of normal/Gaussian distribution |
138 | 138 | // Ref: https://en.wikipedia.org/wiki/Normal_distribution |
@@ -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\Ensemble; |
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\Classification\Ensemble; |
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 | |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | protected function runTraining(array $samples, array $targets) |
65 | 65 | { |
66 | 66 | // The cost function is the sum of squares |
67 | - $callback = function ($weights, $sample, $target) { |
|
67 | + $callback = function($weights, $sample, $target) { |
|
68 | 68 | $this->weights = $weights; |
69 | 69 | |
70 | 70 | $output = $this->output($sample); |