fpembed 0.1.4__tar.gz → 0.1.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. {fpembed-0.1.4/src/fpembed.egg-info → fpembed-0.1.5}/PKG-INFO +8 -8
  2. {fpembed-0.1.4 → fpembed-0.1.5}/README.md +7 -7
  3. {fpembed-0.1.4 → fpembed-0.1.5}/pyproject.toml +1 -1
  4. {fpembed-0.1.4 → fpembed-0.1.5}/src/fpembed/__init__.py +1 -1
  5. {fpembed-0.1.4 → fpembed-0.1.5/src/fpembed.egg-info}/PKG-INFO +8 -8
  6. {fpembed-0.1.4 → fpembed-0.1.5}/LICENSE +0 -0
  7. {fpembed-0.1.4 → fpembed-0.1.5}/setup.cfg +0 -0
  8. {fpembed-0.1.4 → fpembed-0.1.5}/src/fpembed/compression.py +0 -0
  9. {fpembed-0.1.4 → fpembed-0.1.5}/src/fpembed/compression_blockwise.py +0 -0
  10. {fpembed-0.1.4 → fpembed-0.1.5}/src/fpembed/compression_projection.py +0 -0
  11. {fpembed-0.1.4 → fpembed-0.1.5}/src/fpembed/generator.py +0 -0
  12. {fpembed-0.1.4 → fpembed-0.1.5}/src/fpembed/hashing.py +0 -0
  13. {fpembed-0.1.4 → fpembed-0.1.5}/src/fpembed/py.typed +0 -0
  14. {fpembed-0.1.4 → fpembed-0.1.5}/src/fpembed/smiles_utils.py +0 -0
  15. {fpembed-0.1.4 → fpembed-0.1.5}/src/fpembed.egg-info/SOURCES.txt +0 -0
  16. {fpembed-0.1.4 → fpembed-0.1.5}/src/fpembed.egg-info/dependency_links.txt +0 -0
  17. {fpembed-0.1.4 → fpembed-0.1.5}/src/fpembed.egg-info/requires.txt +0 -0
  18. {fpembed-0.1.4 → fpembed-0.1.5}/src/fpembed.egg-info/top_level.txt +0 -0
  19. {fpembed-0.1.4 → fpembed-0.1.5}/tests/test_cache.py +0 -0
  20. {fpembed-0.1.4 → fpembed-0.1.5}/tests/test_compression.py +0 -0
  21. {fpembed-0.1.4 → fpembed-0.1.5}/tests/test_compression_blockwise.py +0 -0
  22. {fpembed-0.1.4 → fpembed-0.1.5}/tests/test_compression_projection.py +0 -0
  23. {fpembed-0.1.4 → fpembed-0.1.5}/tests/test_fingerprints.py +0 -0
  24. {fpembed-0.1.4 → fpembed-0.1.5}/tests/test_generator.py +0 -0
  25. {fpembed-0.1.4 → fpembed-0.1.5}/tests/test_hashing.py +0 -0
  26. {fpembed-0.1.4 → fpembed-0.1.5}/tests/test_properties.py +0 -0
  27. {fpembed-0.1.4 → fpembed-0.1.5}/tests/test_smiles_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fpembed
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: Generalized fingerprint embedding library
5
5
  License-Expression: MIT
6
6
  Requires-Python: >=3.9
@@ -66,12 +66,12 @@ FPembed supports six compression methods, selectable via the `method` parameter
66
66
 
67
67
  | Method (`method` value) | Category | `method_params` | Dynamic Range / Distance Preservation | Complexity |
68
68
  |-------------------------|----------|-----------------|---------------------------------------|------------|
69
- | `geometric` | block-wise | `interleave` (bool) | 65,536:1 dynamic range | O(L) |
70
- | `linear` | block-wise | `interleave` (bool) | S:1 dynamic range | O(L) |
71
- | `log` | block-wise | `interleave` (bool) | ~4.1:1 dynamic range | O(L) |
72
- | `uniform` | block-wise | `interleave` (bool) | 1:1 (mean pooling) | O(L) |
69
+ | `geometric` | block-wise | `interleave` (bool) | 65,536:1 dynamic range | O(L) |
70
+ | `linear` | block-wise | `interleave` (bool) | S:1 dynamic range | O(L) |
71
+ | `log` | block-wise | `interleave` (bool) | ~4.1:1 dynamic range | O(L) |
72
+ | `uniform` | block-wise | `interleave` (bool) | 1:1 (mean pooling) | O(L) |
73
73
  | `hadamard` | global | `seed` (int) | orthogonal projection | O(L log L) |
74
- | `random_projection` | global | `seed` (int) + `sparse` (bool) | JL distance preservation | O(L·D) |
74
+ | `random_projection` | global | `seed` (int) + `sparse` (bool) | JL distance preservation | O(L D) |
75
75
 
76
76
  ### The `method` Parameter
77
77
 
@@ -132,7 +132,7 @@ print(emb.shape) # (1, 128)
132
132
 
133
133
  ### Choosing a Method
134
134
 
135
- Block-wise methods (`geometric`, `linear`, `log`, `uniform`) are fast (O(L)) and simple - use them when speed matters or compression ratios are modest. Among these, `geometric` preserves the most dynamic range while `uniform` treats all bits equally (mean pooling). Global projection methods (`hadamard`, `random_projection`) mix information across all input bits, which helps retain more information at high compression ratios. `hadamard` is efficient (O(L log L)) and requires power-of-2 fingerprint sizes; `random_projection` offers the strongest theoretical distance-preservation guarantees (Johnson-Lindenstrauss lemma) at the cost of O(L·D) complexity.
135
+ Block-wise methods (`geometric`, `linear`, `log`, `uniform`) are fast (O(L)) and simple - use them when speed matters or compression ratios are modest. Among these, `geometric` preserves the most dynamic range while `uniform` treats all bits equally (mean pooling). Global projection methods (`hadamard`, `random_projection`) mix information across all input bits, which helps retain more information at high compression ratios. `hadamard` is efficient (O(L log L)) and requires power-of-2 fingerprint sizes; `random_projection` offers the strongest theoretical distance-preservation guarantees (Johnson-Lindenstrauss lemma) at the cost of O(L D) complexity.
136
136
 
137
137
  ### Performance Characteristics
138
138
 
@@ -141,7 +141,7 @@ All methods produce the same output dimensionality (D = L / compression) but dif
141
141
  | Method | Speed | Precomputed Memory | Best For |
142
142
  |--------|------------------------------------------|--------------------------------------|----------|
143
143
  | Block-wise (all four) | Fastest - single vectorized einsum, O(L) | Negligible (C-length weight vector) | Default choice; large batches |
144
- | Random projection | Fast - BLAS matmul, O(L·D) | DxL matrix (~2 MB for L=2048, D=128) | Best theoretical guarantees (JL lemma) |
144
+ | Random projection | Fast - BLAS matmul, O(L D) | DxL matrix (~2 MB for L=2048, D=128) | Best theoretical guarantees (JL lemma) |
145
145
  | Hadamard (SRHT) | Slowest - pure-Python FWHT, O(L log L) | L-length sign vector (~16 KB) | Small-scale experiments; future optimization |
146
146
 
147
147
  Block-wise methods are ~2–5x faster than random projection and orders of magnitude faster than Hadamard in practice. Random projection's memory cost grows quadratically with fingerprint size.
@@ -46,12 +46,12 @@ FPembed supports six compression methods, selectable via the `method` parameter
46
46
 
47
47
  | Method (`method` value) | Category | `method_params` | Dynamic Range / Distance Preservation | Complexity |
48
48
  |-------------------------|----------|-----------------|---------------------------------------|------------|
49
- | `geometric` | block-wise | `interleave` (bool) | 65,536:1 dynamic range | O(L) |
50
- | `linear` | block-wise | `interleave` (bool) | S:1 dynamic range | O(L) |
51
- | `log` | block-wise | `interleave` (bool) | ~4.1:1 dynamic range | O(L) |
52
- | `uniform` | block-wise | `interleave` (bool) | 1:1 (mean pooling) | O(L) |
49
+ | `geometric` | block-wise | `interleave` (bool) | 65,536:1 dynamic range | O(L) |
50
+ | `linear` | block-wise | `interleave` (bool) | S:1 dynamic range | O(L) |
51
+ | `log` | block-wise | `interleave` (bool) | ~4.1:1 dynamic range | O(L) |
52
+ | `uniform` | block-wise | `interleave` (bool) | 1:1 (mean pooling) | O(L) |
53
53
  | `hadamard` | global | `seed` (int) | orthogonal projection | O(L log L) |
54
- | `random_projection` | global | `seed` (int) + `sparse` (bool) | JL distance preservation | O(L·D) |
54
+ | `random_projection` | global | `seed` (int) + `sparse` (bool) | JL distance preservation | O(L D) |
55
55
 
56
56
  ### The `method` Parameter
57
57
 
@@ -112,7 +112,7 @@ print(emb.shape) # (1, 128)
112
112
 
113
113
  ### Choosing a Method
114
114
 
115
- Block-wise methods (`geometric`, `linear`, `log`, `uniform`) are fast (O(L)) and simple - use them when speed matters or compression ratios are modest. Among these, `geometric` preserves the most dynamic range while `uniform` treats all bits equally (mean pooling). Global projection methods (`hadamard`, `random_projection`) mix information across all input bits, which helps retain more information at high compression ratios. `hadamard` is efficient (O(L log L)) and requires power-of-2 fingerprint sizes; `random_projection` offers the strongest theoretical distance-preservation guarantees (Johnson-Lindenstrauss lemma) at the cost of O(L·D) complexity.
115
+ Block-wise methods (`geometric`, `linear`, `log`, `uniform`) are fast (O(L)) and simple - use them when speed matters or compression ratios are modest. Among these, `geometric` preserves the most dynamic range while `uniform` treats all bits equally (mean pooling). Global projection methods (`hadamard`, `random_projection`) mix information across all input bits, which helps retain more information at high compression ratios. `hadamard` is efficient (O(L log L)) and requires power-of-2 fingerprint sizes; `random_projection` offers the strongest theoretical distance-preservation guarantees (Johnson-Lindenstrauss lemma) at the cost of O(L D) complexity.
116
116
 
117
117
  ### Performance Characteristics
118
118
 
@@ -121,7 +121,7 @@ All methods produce the same output dimensionality (D = L / compression) but dif
121
121
  | Method | Speed | Precomputed Memory | Best For |
122
122
  |--------|------------------------------------------|--------------------------------------|----------|
123
123
  | Block-wise (all four) | Fastest - single vectorized einsum, O(L) | Negligible (C-length weight vector) | Default choice; large batches |
124
- | Random projection | Fast - BLAS matmul, O(L·D) | DxL matrix (~2 MB for L=2048, D=128) | Best theoretical guarantees (JL lemma) |
124
+ | Random projection | Fast - BLAS matmul, O(L D) | DxL matrix (~2 MB for L=2048, D=128) | Best theoretical guarantees (JL lemma) |
125
125
  | Hadamard (SRHT) | Slowest - pure-Python FWHT, O(L log L) | L-length sign vector (~16 KB) | Small-scale experiments; future optimization |
126
126
 
127
127
  Block-wise methods are ~2–5x faster than random projection and orders of magnitude faster than Hadamard in practice. Random projection's memory cost grows quadratically with fingerprint size.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "fpembed"
7
- version = "0.1.4"
7
+ version = "0.1.5"
8
8
  description = "Generalized fingerprint embedding library"
9
9
  requires-python = ">=3.9"
10
10
  dependencies = [
@@ -20,7 +20,7 @@ from fpembed.compression import compress_fingerprint
20
20
  from fpembed.smiles_utils import parse_smiles, canonicalize_smiles
21
21
  from fpembed.hashing import fp_params_hash
22
22
 
23
- __version__ = "0.1.4"
23
+ __version__ = "0.1.5"
24
24
 
25
25
  __all__ = [
26
26
  "EmbeddedFingerprintGenerator",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fpembed
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: Generalized fingerprint embedding library
5
5
  License-Expression: MIT
6
6
  Requires-Python: >=3.9
@@ -66,12 +66,12 @@ FPembed supports six compression methods, selectable via the `method` parameter
66
66
 
67
67
  | Method (`method` value) | Category | `method_params` | Dynamic Range / Distance Preservation | Complexity |
68
68
  |-------------------------|----------|-----------------|---------------------------------------|------------|
69
- | `geometric` | block-wise | `interleave` (bool) | 65,536:1 dynamic range | O(L) |
70
- | `linear` | block-wise | `interleave` (bool) | S:1 dynamic range | O(L) |
71
- | `log` | block-wise | `interleave` (bool) | ~4.1:1 dynamic range | O(L) |
72
- | `uniform` | block-wise | `interleave` (bool) | 1:1 (mean pooling) | O(L) |
69
+ | `geometric` | block-wise | `interleave` (bool) | 65,536:1 dynamic range | O(L) |
70
+ | `linear` | block-wise | `interleave` (bool) | S:1 dynamic range | O(L) |
71
+ | `log` | block-wise | `interleave` (bool) | ~4.1:1 dynamic range | O(L) |
72
+ | `uniform` | block-wise | `interleave` (bool) | 1:1 (mean pooling) | O(L) |
73
73
  | `hadamard` | global | `seed` (int) | orthogonal projection | O(L log L) |
74
- | `random_projection` | global | `seed` (int) + `sparse` (bool) | JL distance preservation | O(L·D) |
74
+ | `random_projection` | global | `seed` (int) + `sparse` (bool) | JL distance preservation | O(L D) |
75
75
 
76
76
  ### The `method` Parameter
77
77
 
@@ -132,7 +132,7 @@ print(emb.shape) # (1, 128)
132
132
 
133
133
  ### Choosing a Method
134
134
 
135
- Block-wise methods (`geometric`, `linear`, `log`, `uniform`) are fast (O(L)) and simple - use them when speed matters or compression ratios are modest. Among these, `geometric` preserves the most dynamic range while `uniform` treats all bits equally (mean pooling). Global projection methods (`hadamard`, `random_projection`) mix information across all input bits, which helps retain more information at high compression ratios. `hadamard` is efficient (O(L log L)) and requires power-of-2 fingerprint sizes; `random_projection` offers the strongest theoretical distance-preservation guarantees (Johnson-Lindenstrauss lemma) at the cost of O(L·D) complexity.
135
+ Block-wise methods (`geometric`, `linear`, `log`, `uniform`) are fast (O(L)) and simple - use them when speed matters or compression ratios are modest. Among these, `geometric` preserves the most dynamic range while `uniform` treats all bits equally (mean pooling). Global projection methods (`hadamard`, `random_projection`) mix information across all input bits, which helps retain more information at high compression ratios. `hadamard` is efficient (O(L log L)) and requires power-of-2 fingerprint sizes; `random_projection` offers the strongest theoretical distance-preservation guarantees (Johnson-Lindenstrauss lemma) at the cost of O(L D) complexity.
136
136
 
137
137
  ### Performance Characteristics
138
138
 
@@ -141,7 +141,7 @@ All methods produce the same output dimensionality (D = L / compression) but dif
141
141
  | Method | Speed | Precomputed Memory | Best For |
142
142
  |--------|------------------------------------------|--------------------------------------|----------|
143
143
  | Block-wise (all four) | Fastest - single vectorized einsum, O(L) | Negligible (C-length weight vector) | Default choice; large batches |
144
- | Random projection | Fast - BLAS matmul, O(L·D) | DxL matrix (~2 MB for L=2048, D=128) | Best theoretical guarantees (JL lemma) |
144
+ | Random projection | Fast - BLAS matmul, O(L D) | DxL matrix (~2 MB for L=2048, D=128) | Best theoretical guarantees (JL lemma) |
145
145
  | Hadamard (SRHT) | Slowest - pure-Python FWHT, O(L log L) | L-length sign vector (~16 KB) | Small-scale experiments; future optimization |
146
146
 
147
147
  Block-wise methods are ~2–5x faster than random projection and orders of magnitude faster than Hadamard in practice. Random projection's memory cost grows quadratically with fingerprint size.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes