polymerist.genutils.sequences.similarity.distances ================================================== .. py:module:: polymerist.genutils.sequences.similarity.distances .. autoapi-nested-parse:: Implementations of calculation methods for sequence distance ("inverse similarity") metrics Attributes ---------- .. autoapisummary:: polymerist.genutils.sequences.similarity.distances.T polymerist.genutils.sequences.similarity.distances.tanimoto_distance Functions --------- .. autoapisummary:: polymerist.genutils.sequences.similarity.distances.hamming_distance polymerist.genutils.sequences.similarity.distances.jaccard_distance Module Contents --------------- .. py:data:: T .. py:function:: hamming_distance(seq1: Sequence[T], seq2: Sequence[T]) -> int Compute the Hamming distance between a pair of sequences with elements of compatible type (sequences must have the same length) Denotes the number of elements at the same positions in each sequence which are different .. py:function:: jaccard_distance(seq1: Sequence[T], seq2: Sequence[T]) -> float Compute the Jaccard distance between a pair of sequences with elements of compatible type Denotes the complement of the ratio of shared elements (intersection) to total elements (union) .. py:data:: tanimoto_distance