Skip to content

Commit

Permalink
fix(protos): missing subsampling for Ps calibrated
Browse files Browse the repository at this point in the history
  • Loading branch information
Dariush Wahdany committed Dec 22, 2023
1 parent dc02db9 commit 133f8eb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/dp_learning_ff/prototypes.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import warnings
from abc import ABC, abstractmethod
from dataclasses import dataclass
from typing import Iterable, Optional
import warnings

import numpy as np
from sklearn.metrics.pairwise import cosine_similarity

from dp_learning_ff.coinpress import algos

from .mechanisms import ScaledCoinpressGM, calibrate_single_param


Expand Down Expand Up @@ -164,7 +165,12 @@ def calibrate_Ps(self):
)

def scaled_mechanism(scale):
return ScaledCoinpressGM(scale=scale, Ps=self.Ps, name="ScaledCoinpressGM")
return ScaledCoinpressGM(
scale=scale,
Ps=self.Ps,
p_sampling=self.p_sampling,
name="ScaledCoinpressGM",
)

calibrated_mechanism = calibrate_single_param(
scaled_mechanism, self.epsilon, self.delta
Expand Down

0 comments on commit 133f8eb

Please sign in to comment.