jax_privacy.matrix_factorization.banded.ColumnNormalizedBanded

class jax_privacy.matrix_factorization.banded.ColumnNormalizedBanded(params)[source]

Bases: Mapping

A column-normalized banded lower triangular n x n matrix.

This matrix class is parameterized by an arbitrary n x b matrix. C(params) is obtained by setting the first b bands of C based on params. The matrix is normalized to have sensitivity 1 under a single epoch, by dividing each column by its respective norm.

Below we show how params relates to the matrix (before column normalization):

params = [a b c]
         [d e f]
         [g h i]
         [j k -]
         [m - -]

C = [a        ]
    [b d      ]
    [c e g    ]
    [  f h j  ]
    [    i k m]

Methods

__init__

default

Construct a default instance of this object given n and bands.

from_banded_toeplitz

Construct an instance of this object from banded toeplitz coefficients.

from_tuple

get

Retrieves the corresponding layout by the string key.

inverse_as_streaming_matrix

Create $C^{-1}$ as a StreamingMatrix object.

items

D.items() -> a set-like object providing a view on D's items

keys

D.keys() -> a set-like object providing a view on D's keys

materialize

replace

to_tuple

values

D.values() -> an object providing a view on D's values

Attributes

bands

n

params

params: Array
property n: int
property bands: int
classmethod from_banded_toeplitz(n, coefs)[source]

Construct an instance of this object from banded toeplitz coefficients.

Parameters:
  • n (int) – the number of training iterations.

  • coefs (Array) – an array of b toeplitz coefficients defining the strategy.

Return type:

ColumnNormalizedBanded

Returns:

A ColumnNormalizedBanded representation of the banded toeplitz matrix.

classmethod default(n, bands)[source]

Construct a default instance of this object given n and bands.

This object is initialized by using the fixed toeplitz strategy proposed in [1; Algorithm 1], truncating to $b$ entries, and column normalizing. It can act as a useful initialization for further optimization.

[1] https://proceedings.mlr.press/v202/fichtenberger23a/fichtenberger23a.pdf

Parameters:
  • n (int) – the number of training iterations.

  • bands (int) – the number of bands in the strategy.

Return type:

ColumnNormalizedBanded

Returns:

A ColumnNormalizedBanded object.

materialize()[source]
Return type:

Array

inverse_as_streaming_matrix()[source]

Create $C^{-1}$ as a StreamingMatrix object.

Return type:

StreamingMatrix

from_tuple()
items() a set-like object providing a view on D's items
keys() a set-like object providing a view on D's keys
replace(**kwargs)
to_tuple()
values() an object providing a view on D's values