propeller.tools.metrics
Functions to measure things.
argmax
(argmax coll)
returns the index of the maximum value in a list, randomly tiebreaking
argmax-last
(argmax-last coll)
returns the index of the maximum value in a list, tiebreaking last
argmins
(argmins coll)
returns the indice(s) of the minimum value of a list. Could be more efficient, probably
compute-next-row
(compute-next-row prev-row current-element other-seq pred)
computes the next row using the prev-row current-element and the other seq
hamming-distance
(hamming-distance seq1 seq2)
Calculates the Hamming distance between two sequences, including strings.
levenshtein-distance
(levenshtein-distance a b & {p :predicate, :or {p =}})
Levenshtein Distance - http://en.wikipedia.org/wiki/Levenshtein_distance In Information Theory and Computer Science, the Levenshtein distance is a metric for measuring the amount of difference between two sequences. This is a functional implementation of the Levenshtein edit distance with as little mutability as possible. Still maintains the O(nm) guarantee.
mean
(mean coll)
Returns the mean of a collection.
mean-of-colls
(mean-of-colls coll)
returns the mean of multiple colls
median
(median coll)
Returns the median of a collection.
min-of-colls
(min-of-colls coll)
returns the smallest value of multiple colls
multiset-distance
(multiset-distance ms1 ms2)
Returns the total of the differences between the counts of all items across the provided multisets.
sequence-similarity
(sequence-similarity seq1 seq2)
Returns a number between 0 and 1, indicating how similar the sequences are as a normalized, inverted Levenshtein distance, with 1 indicating identity and 0 indicating no similarity.