@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Phpml\Classification\DecisionTree; |
| 5 | 5 | |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | /** |
| 25 | 25 | * @var DecisionTreeLeaf |
| 26 | 26 | */ |
| 27 | - public $rightLeaf= null; |
|
| 27 | + public $rightLeaf = null; |
|
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | 30 | * @var array |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | $recordField = $record[$this->columnIndex]; |
| 64 | 64 | if (preg_match("/^([<>=]{1,2})\s*(.*)/", $this->value, $matches)) { |
| 65 | 65 | $op = $matches[1]; |
| 66 | - $value= floatval($matches[2]); |
|
| 66 | + $value = floatval($matches[2]); |
|
| 67 | 67 | $recordField = strval($recordField); |
| 68 | 68 | eval("\$result = $recordField $op $value;"); |
| 69 | 69 | return $result; |
@@ -78,25 +78,25 @@ discard block |
||
| 78 | 78 | } else { |
| 79 | 79 | $value = $this->value; |
| 80 | 80 | $col = "col_$this->columnIndex"; |
| 81 | - if (! preg_match("/^[<>=]{1,2}/", $value)) { |
|
| 81 | + if (!preg_match("/^[<>=]{1,2}/", $value)) { |
|
| 82 | 82 | $value = "=$value"; |
| 83 | 83 | } |
| 84 | - $value = "<b>$col $value</b><br>Gini: ". number_format($this->giniIndex, 2); |
|
| 84 | + $value = "<b>$col $value</b><br>Gini: ".number_format($this->giniIndex, 2); |
|
| 85 | 85 | } |
| 86 | 86 | $str = "<table ><tr><td colspan=3 align=center style='border:1px solid;'> |
| 87 | 87 | $value</td></tr>"; |
| 88 | 88 | if ($this->leftLeaf || $this->rightLeaf) { |
| 89 | - $str .='<tr>'; |
|
| 89 | + $str .= '<tr>'; |
|
| 90 | 90 | if ($this->leftLeaf) { |
| 91 | - $str .="<td valign=top><b>| Yes</b><br>$this->leftLeaf</td>"; |
|
| 91 | + $str .= "<td valign=top><b>| Yes</b><br>$this->leftLeaf</td>"; |
|
| 92 | 92 | } else { |
| 93 | - $str .='<td></td>'; |
|
| 93 | + $str .= '<td></td>'; |
|
| 94 | 94 | } |
| 95 | - $str .='<td> </td>'; |
|
| 95 | + $str .= '<td> </td>'; |
|
| 96 | 96 | if ($this->rightLeaf) { |
| 97 | - $str .="<td valign=top align=right><b>No |</b><br>$this->rightLeaf</td>"; |
|
| 97 | + $str .= "<td valign=top align=right><b>No |</b><br>$this->rightLeaf</td>"; |
|
| 98 | 98 | } else { |
| 99 | - $str .='<td></td>'; |
|
| 99 | + $str .= '<td></td>'; |
|
| 100 | 100 | } |
| 101 | 101 | $str .= '</tr>'; |
| 102 | 102 | } |
@@ -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; |
| 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\CrossValidation; |
| 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\CrossValidation; |
| 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\SupportVectorMachine; |
| 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\SupportVectorMachine; |
| 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\SupportVectorMachine; |
| 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\Tokenization; |
| 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\Tokenization; |
| 6 | 6 | |