Passed
Pull Request — master (#220)
by Andreas
02:19
created
src/Classification/WeightedClassifier.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Phpml\Classification;
6 6
 
Please login to merge, or discard this patch.
src/Classification/Ensemble/RandomForest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Classification/Ensemble/Bagging.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Classification/Ensemble/AdaBoost.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Classification/DecisionTree/DecisionTreeLeaf.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Classification/Linear/LogisticRegression.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
                  * The gradient of the cost function to be used with gradient descent:
194 194
                  *		∇J(x) = -(y - h(x)) = (h(x) - y)
195 195
                  */
196
-                $callback = function ($weights, $sample, $y) use ($penalty) {
196
+                $callback = function($weights, $sample, $y) use ($penalty) {
197 197
                     $this->weights = $weights;
198 198
                     $hX = $this->output($sample);
199 199
 
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
                  * The gradient of the cost function:
225 225
                  *		∇J(x) = -(h(x) - y) . h(x) . (1 - h(x))
226 226
                  */
227
-                $callback = function ($weights, $sample, $y) use ($penalty) {
227
+                $callback = function($weights, $sample, $y) use ($penalty) {
228 228
                     $this->weights = $weights;
229 229
                     $hX = $this->output($sample);
230 230
 
Please login to merge, or discard this patch.
src/Classification/Linear/DecisionStump.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Classification/Linear/Perceptron.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Classification/Linear/Adaline.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.