@@ -50,7 +50,7 @@ |
||
50 | 50 | $this->value = $value; |
51 | 51 | $this->groups = $groups; |
52 | 52 | $this->impurity = $impurity; |
53 | - $this->samplesCount = (int) array_sum(array_map(function (array $group) { |
|
53 | + $this->samplesCount = (int) array_sum(array_map(function(array $group) { |
|
54 | 54 | return count($group[0]); |
55 | 55 | }, $groups)); |
56 | 56 | } |
@@ -99,7 +99,7 @@ |
||
99 | 99 | |
100 | 100 | protected function splitImpurity(array $groups): float |
101 | 101 | { |
102 | - $samplesCount = (int) array_sum(array_map(static function (array $group) { |
|
102 | + $samplesCount = (int) array_sum(array_map(static function(array $group) { |
|
103 | 103 | return count($group[0]); |
104 | 104 | }, $groups)); |
105 | 105 |
@@ -48,7 +48,7 @@ |
||
48 | 48 | |
49 | 49 | public function transform(array &$samples, ?array &$targets = null): void |
50 | 50 | { |
51 | - array_walk($samples, function (string &$sample): void { |
|
51 | + array_walk($samples, function(string &$sample): void { |
|
52 | 52 | $this->transformSample($sample); |
53 | 53 | }); |
54 | 54 |
@@ -18,10 +18,10 @@ |
||
18 | 18 | |
19 | 19 | public function __construct(array $datasetColumns, array $filterColumns) |
20 | 20 | { |
21 | - $this->datasetColumns = array_map(static function (string $column): string { |
|
21 | + $this->datasetColumns = array_map(static function(string $column): string { |
|
22 | 22 | return $column; |
23 | 23 | }, $datasetColumns); |
24 | - $this->filterColumns = array_map(static function (string $column): string { |
|
24 | + $this->filterColumns = array_map(static function(string $column): string { |
|
25 | 25 | return $column; |
26 | 26 | }, $filterColumns); |
27 | 27 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | throw new InvalidArgumentException('At least one pipeline is required'); |
23 | 23 | } |
24 | 24 | |
25 | - $this->pipelines = array_map(static function (Pipeline $pipeline): Pipeline { |
|
25 | + $this->pipelines = array_map(static function(Pipeline $pipeline): Pipeline { |
|
26 | 26 | return $pipeline; |
27 | 27 | }, $pipelines); |
28 | 28 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | */ |
24 | 24 | public function __construct(array $transformers, ?Estimator $estimator = null) |
25 | 25 | { |
26 | - $this->transformers = array_map(static function (Transformer $transformer): Transformer { |
|
26 | + $this->transformers = array_map(static function(Transformer $transformer): Transformer { |
|
27 | 27 | return $transformer; |
28 | 28 | }, $transformers); |
29 | 29 | $this->estimator = $estimator; |