completed: ComputeSimilarityFactor.m