subspace_similarity function

Compute subspace similarity