Added treshold option to Shard, Similarity and SimilarityMatrix