estimate pairwise row similarity