def distance(self, x, y):
if scipy.sparse.issparse(x):<EOL><INDENT>x = x.toarray().ravel()<EOL>y = y.toarray().ravel()<EOL><DEDENT>return <NUM_LIT:1.0> - numpy.dot(x, y)<EOL>
Computes distance measure between vectors x and y. Returns float.