def shrink_if_necessary(self, cat, new_aif, minif):
"""
Shrink if the AIF if categories don't match and error-compensating AIF < currently held AIF.
"""
log.trace("Neuron.shrink_if_necessary()")
# TODO: create unit test where misfiring neuron has exactly the same distance as the best neuron.
if cat != self.cat and new_aif < self.aif:
self.shrink_aif(new_aif, minif)
评论列表
文章目录