def evaluate(self, X, y):
scores = self.ops.flatten(list(self.pipe(X)))<EOL>if not hasattr(y, "<STR_LIT>"):<EOL><INDENT>y = self.ops.flatten(y)<EOL><DEDENT>scores = scores.reshape(y.shape)<EOL>if len(scores.shape) == <NUM_LIT:1>:<EOL><INDENT>correct = ((scores >= <NUM_LIT:0.5>) == (y >= <NUM_LIT:0.5>)).sum()<EOL><DEDENT>else:<EOL><INDENT>correct = (scores.argmax(axis=<NUM_LIT:1>) == y.argmax(axis=<NUM_LIT:1>)).sum()<EOL><DEDENT>return correct / y.shape[<NUM_LIT:0>]<EOL>
x
    Must match expected type
    Must match expected shape
y
    Must match expected type