@@ -306,7 +306,4 @@ |
||
| 306 | 306 | } |
| 307 | 307 | return $this->labels[0]; |
| 308 | 308 | ======= |
| 309 | - return $node->classValue; |
|
| 310 | ->>>>>>> refs/remotes/php-ai/master |
|
| 311 | - } |
|
| 312 | -} |
|
| 309 | + return $node->classValue |
|
| 313 | 310 | \ No newline at end of file |
@@ -105,6 +105,4 @@ |
||
| 105 | 105 | $str .= '</tr>'; |
| 106 | 106 | } |
| 107 | 107 | $str .= '</table>'; |
| 108 | - return $str; |
|
| 109 | - } |
|
| 110 | -} |
|
| 108 | + return $str |
|
| 111 | 109 | \ No newline at end of file |
@@ -6,10 +6,8 @@ |
||
| 6 | 6 | |
| 7 | 7 | use Phpml\Helper\Predictable; |
| 8 | 8 | use Phpml\Helper\Trainable; |
| 9 | -use Phpml\Math\Statistic\Mean; |
|
| 10 | 9 | use Phpml\Classification\Classifier; |
| 11 | 10 | use Phpml\Classification\DecisionTree; |
| 12 | -use Phpml\Classification\NaiveBayes; |
|
| 13 | 11 | |
| 14 | 12 | class Bagging implements Classifier |
| 15 | 13 | { |
@@ -4,8 +4,6 @@ |
||
| 4 | 4 | namespace Phpml\Classification\Ensemble; |
| 5 | 5 | |
| 6 | 6 | use Phpml\Classification\Ensemble\Bagging; |
| 7 | -use Phpml\Classification\DecisionTree; |
|
| 8 | -use Phpml\Classification\NaiveBayes; |
|
| 9 | 7 | |
| 10 | 8 | class RandomForest extends Bagging |
| 11 | 9 | { |
@@ -187,6 +187,4 @@ |
||
| 187 | 187 | } |
| 188 | 188 | arsort($predictions, SORT_NUMERIC); |
| 189 | 189 | reset($predictions); |
| 190 | - return key($predictions); |
|
| 191 | - } |
|
| 192 | -} |
|
| 190 | + return key($predictions |
|
| 193 | 191 | \ No newline at end of file |
@@ -241,6 +241,4 @@ |
||
| 241 | 241 | foreach ($this->clusters as $cluster) { |
| 242 | 242 | $grouped[] = $cluster->getPoints(); |
| 243 | 243 | } |
| 244 | - return $grouped; |
|
| 245 | - } |
|
| 246 | -} |
|
| 244 | + return $grouped |
|
| 247 | 245 | \ No newline at end of file |