jax_privacy.matrix_factorization.buffered_toeplitz.StreamingMatrixBuilder
- class jax_privacy.matrix_factorization.buffered_toeplitz.StreamingMatrixBuilder(*, buf_decay, output_scale)[source]
Bases:
objectBuilder to convert a BLT to a StreamingMatrix.
- Variables:
buf_decay – A numpy array of shape (num_buffers,) representing the decay factors for each buffer.
output_scale – A numpy array of shape (num_buffers,) representing the scale factors applied to each buffer when reading the output.
Methods
__init__Returns a StreamingMatrix representing C.
Returns a StreamingMatrix representing C^{-1}.
Attributes
Returns the dtype of the BLT parameters.
-
buf_decay:
ndarray
-
output_scale:
ndarray
- property dtype: dtype
Returns the dtype of the BLT parameters.
- build()[source]
Returns a StreamingMatrix representing C.
This implements Alg 2 of https://arxiv.org/pdf/2408.08868
- Return type:
- build_inverse()[source]
Returns a StreamingMatrix representing C^{-1}.
This implements Alg 3 of https://arxiv.org/pdf/2408.08868
- Return type: