jax_privacy.matrix_factorization.dense.per_query_error#
- jax_privacy.matrix_factorization.dense.per_query_error(*, strategy_matrix=None, noising_matrix=None, workload_matrix=None, skip_checks=False)[source]#
Expected per-query squared error for a general matrix mechanism.
Exactly one of
strategy_matrixandnoising_matrixshould be provided.- Parameters:
strategy_matrix (
Array|None) – The (square) strategy matrix \(C\) defining the mechanism.noising_matrix (
Array|None) – The (possibly non-square) noising matrix \(C^{-1}\).workload_matrix (
Array|None) – The workload matrix. Defaults tojax.numpy.tri(), the prefix sum workload matrix.skip_checks (
bool) – IfTrue, skip input verification that depends on array values (e.g. finiteness, triangularity). Checks on static attributes (shapes, None-ness) are always performed.
- Return type:
Array- Returns:
The expected per-query squared error, an array of length n.