def __init__( self, legalLabels, max_iterations):
self.legalLabels = legalLabels
self.type = "perceptron"
self.max_iterations = max_iterations
self.weights = {}
for label in legalLabels:
self.weights[label] = util.Counter() # this is the data-structure you should use
评论列表
文章目录