Return the most common target label.
(self, neighbors_targets)
| 59 | the predicted label is arbitrary.""" |
| 60 | |
| 61 | def aggregate(self, neighbors_targets): |
| 62 | """Return the most common target label.""" |
| 63 | |
| 64 | most_common_label = Counter(neighbors_targets).most_common(1)[0][0] |
| 65 | return most_common_label |
| 66 | |
| 67 | |
| 68 | class KNNRegressor(KNNBase): |
nothing calls this directly
no outgoing calls
no test coverage detected