| Conditions | 7 |
| Paths | 15 |
| Total Lines | 32 |
| Code Lines | 25 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 75 | return $recordField == $this->value; |
||
| 76 | } |
||
| 77 | |||
| 78 | public function __toString() |
||
| 79 | { |
||
| 80 | if ($this->isTerminal) { |
||
| 81 | $value = "<b>$this->classValue</b>"; |
||
| 82 | } else { |
||
| 83 | $value = $this->value; |
||
| 84 | $col = "col_$this->columnIndex"; |
||
| 85 | if (! preg_match("/^[<>=]{1,2}/", $value)) { |
||
| 86 | $value = "=$value"; |
||
| 87 | } |
||
| 88 | $value = "<b>$col $value</b><br>Gini: ". number_format($this->giniIndex, 2); |
||
| 89 | } |
||
| 90 | $str = "<table ><tr><td colspan=3 align=center style='border:1px solid;'> |
||
| 91 | $value</td></tr>"; |
||
| 92 | if ($this->leftLeaf || $this->rightLeaf) { |
||
| 93 | $str .='<tr>'; |
||
| 94 | if ($this->leftLeaf) { |
||
| 95 | $str .="<td valign=top><b>| Yes</b><br>$this->leftLeaf</td>"; |
||
| 96 | } else { |
||
| 97 | $str .='<td></td>'; |
||
| 98 | } |
||
| 99 | $str .='<td> </td>'; |
||
| 100 | if ($this->rightLeaf) { |
||
| 101 | $str .="<td valign=top align=right><b>No |</b><br>$this->rightLeaf</td>"; |
||
| 102 | } else { |
||
| 103 | $str .='<td></td>'; |
||
| 104 | } |
||
| 105 | $str .= '</tr>'; |
||
| 106 | } |
||
| 107 | $str .= '</table>'; |
||
| 111 |