Optimizing the accuracy of randomized embedding for sequence alignment