k-nearest-neighbour classifier.
If enabled it stores the votes per class in the 'values' state after
calling predict().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getMajorityVote(self,
knn_ids)
Simple voting by choosing the majority of class neighbours. |
source code
|
|
|
|
getWeightedVote(self,
knn_ids)
Vote with classes weighted by the number of samples per class. |
source code
|
|
|
|
|
|
Inherited from base.Classifier:
getSensitivityAnalyzer,
isTrained,
predict,
regression,
train,
train2predict,
trained
Inherited from misc.state.Stateful:
__getattribute__,
__setattr__,
reset
Inherited from object:
__delattr__,
__hash__,
__new__,
__reduce__,
__reduce_ex__
|