def score(self, X, y):
predictions = self.predict(X)<EOL>true = <NUM_LIT:0.0><EOL>total = <NUM_LIT:0.0><EOL>for i in range(len(predictions)):<EOL><INDENT>total += <NUM_LIT:1><EOL>if predictions[i] == y[i]:<EOL><INDENT>true += <NUM_LIT:1><EOL><DEDENT><DEDENT>return true/total<EOL>
Calculate accuracy score.

Needed because of bug in metrics.accuracy_score when comparing
list with numpy array.