Completed
Push — master ( deefbb...2ee0d3 )
by Arkadiusz
03:03
created
src/Classification/Linear/LogisticRegression.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
                  * The gradient of the cost function to be used with gradient descent:
189 189
                  *		∇J(x) = -(y - h(x)) = (h(x) - y)
190 190
                  */
191
-                return function ($weights, $sample, $y) use ($penalty): array {
191
+                return function($weights, $sample, $y) use ($penalty): array {
192 192
                     $this->weights = $weights;
193 193
                     $hX = $this->output($sample);
194 194
 
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
                  * The gradient of the cost function:
221 221
                  *		∇J(x) = -(h(x) - y) . h(x) . (1 - h(x))
222 222
                  */
223
-                return function ($weights, $sample, $y) use ($penalty): array {
223
+                return function($weights, $sample, $y) use ($penalty): array {
224 224
                     $this->weights = $weights;
225 225
                     $hX = $this->output($sample);
226 226
 
Please login to merge, or discard this patch.
src/Regression/DecisionTreeRegressor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
 
122 122
     protected function splitImpurity(array $groups): float
123 123
     {
124
-        $samplesCount = (int) array_sum(array_map(static function (array $group): int {
124
+        $samplesCount = (int) array_sum(array_map(static function(array $group): int {
125 125
             return count($group[0]);
126 126
         }, $groups));
127 127
 
Please login to merge, or discard this patch.