e3fp.fingerprint.metrics package¶
Submodules¶
Module contents¶
Efficient comparison metrics for fingerprints and their databases.
Author: Seth Axen E-mail: seth.axen@gmail.com
-
cosine
(A, B=None)[source]¶ Compute cosine similarities between fingerprints.
Fingerprints must have same number of bits. If only one fingerprint/database is provided, it is compared to self.
- Parameters
A, B (Fingerprint or FingerprintDatabase) – Fingerprint(s) to be compared
- Returns
cosine
- Return type
float or ndarray [shape (num_fps_A, num_fps_B)]
See also
-
dice
(A, B=None)[source]¶ Compute Dice coefficients between fingerprints.
Fingerprints must have same number of bits. If not bit-fingerprints, arrays will be cast to binary. If only one fingerprint/database is provided, it is compared to self.
- Parameters
A, B (Fingerprint or FingerprintDatabase) – Fingerprint(s) to be compared
- Returns
dice
- Return type
float or ndarray [shape (num_fps_A, num_fps_B)]
See also
-
pearson
(A, B=None)[source]¶ Compute Pearson correlation between fingerprints.
Fingerprints must have same number of bits. If only one fingerprint/database is provided, it is compared to self.
- Parameters
A, B (Fingerprint or FingerprintDatabase) – Fingerprint(s) to be compared
- Returns
pearson
- Return type
float or ndarray [shape (num_fps_A, num_fps_B)]
See also
-
soergel
(A, B=None)[source]¶ Compute Soergel similarities between fingerprints.
Soergel similarity is the complement of the Soergel distance and is analogous to the Tanimoto coefficient for count/float fingerprints. For binary data, it is equivalent to
tanimoto
.- Parameters
A, B (Fingerprint or FingerprintDatabase) – Fingerprint(s) to be compared
- Returns
soergel
- Return type
float or ndarray [shape (num_fps_A, num_fps_B)]
See also
-
tanimoto
(A, B=None)[source]¶ Compute Tanimoto coefficients between fingerprints.
Fingerprints must have same number of bits. If not bit-fingerprints, arrays will be cast to binary. For non-binary data, use
soergel
. If only one fingerprint/database is provided, it is compared to self.- Parameters
A, B (Fingerprint or FingerprintDatabase) – Fingerprint(s) to be compared
- Returns
tanimoto – Pairwise tanimoto(s) between fingerprint(s) in A and B.
- Return type
float or ndarray [shape (num_fps_A, num_fps_B)]