Passed
Pull Request — master (#255)
by
unknown
02:29
created
src/Clustering/KMeans/Cluster.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@
 block discarded – undo
128 128
     }
129 129
 
130 130
     /**
131
-     * @return mixed
131
+     * @return integer
132 132
      */
133 133
     public function count()
134 134
     {
Please login to merge, or discard this patch.
src/NeuralNetwork/Network/MultilayerPerceptron.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -142,6 +142,9 @@
 block discarded – undo
142 142
         $this->addLayer(new Layer($nodes, Input::class));
143 143
     }
144 144
 
145
+    /**
146
+     * @param ActivationFunction $defaultActivationFunction
147
+     */
145 148
     private function addNeuronLayers(array $layers, ?ActivationFunction $defaultActivationFunction = null): void
146 149
     {
147 150
         foreach ($layers as $layer) {
Please login to merge, or discard this patch.
src/Math/Matrix.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -142,23 +142,23 @@
 block discarded – undo
142 142
             throw new InvalidArgumentException('Inconsistent matrix supplied');
143 143
         }
144 144
 
145
-		$array1 = $this->toArray();
146
-		$array2 = $matrix->toArray();
147
-		$colCount = $matrix->columns;
148
-
149
-		$product = [];
150
-		foreach($array1 as $row => $rowData){
151
-			for($col = 0; $col < $colCount; ++$col) {
152
-				$columnData = array_column($array2, $col);
153
-				$sum = 0;
154
-				foreach($rowData as $key => $valueData) {
155
-					$sum += $valueData * $columnData[$key];
156
-				}
157
-				$product[$row][$col] = $sum;
158
-			}
159
-		}
160
-
161
-		return new self($product, false);
145
+        $array1 = $this->toArray();
146
+        $array2 = $matrix->toArray();
147
+        $colCount = $matrix->columns;
148
+
149
+        $product = [];
150
+        foreach($array1 as $row => $rowData){
151
+            for($col = 0; $col < $colCount; ++$col) {
152
+                $columnData = array_column($array2, $col);
153
+                $sum = 0;
154
+                foreach($rowData as $key => $valueData) {
155
+                    $sum += $valueData * $columnData[$key];
156
+                }
157
+                $product[$row][$col] = $sum;
158
+            }
159
+        }
160
+
161
+        return new self($product, false);
162 162
     }
163 163
 
164 164
     public function divideByScalar($value): self
Please login to merge, or discard this patch.