| Conditions | 4 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | public function train(array $samples, array $targets) |
||
| 44 | { |
||
| 45 | // Check if a column index was given |
||
| 46 | if ($this->columnIndex >= 0 && $this->columnIndex > count($samples[0]) - 1) { |
||
| 47 | $this->columnIndex = -1; |
||
| 48 | } |
||
| 49 | |||
| 50 | if ($this->columnIndex >= 0) { |
||
| 51 | $this->setSelectedFeatures([$this->columnIndex]); |
||
| 52 | } |
||
| 53 | |||
| 54 | parent::train($samples, $targets); |
||
| 55 | } |
||
| 56 | } |
||
| 57 |