def adjust_b (prototype, pattern, beta) : prototype_ = (1.0 - beta) * prototype + beta * vectors.minimum (prototype, pattern) prototype_ /= vectors.magnitude (prototype_) return prototype_
def adjust (self, prototype, pattern, learning) : prototype_ = (1.0 - learning) * prototype + learning * vectors.minimum (prototype, pattern) prototype_ /= vectors.magnitude (prototype_) return prototype_