modified from_similarity.py to compute similarity on each week.