How to use the diffprivlib.mechanisms.DPMechanism function in diffprivlib

To help you get started, we’ve selected a few diffprivlib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github IBM / differential-privacy-library / tests / mechanisms / test_Staircase.py View on Github external
def test_class(self):
        from diffprivlib.mechanisms import DPMechanism
        self.assertTrue(issubclass(Staircase, DPMechanism))
github IBM / differential-privacy-library / tests / mechanisms / test_DPMechanism.py View on Github external
def test_instantiation(self):
        with self.assertRaises(TypeError):
            DPMechanism()
github IBM / differential-privacy-library / tests / mechanisms / test_ExponentialHierarchical.py View on Github external
def test_class(self):
        from diffprivlib.mechanisms import DPMechanism
        self.assertTrue(issubclass(ExponentialHierarchical, DPMechanism))
github IBM / differential-privacy-library / tests / mechanisms / test_GeometricFolded.py View on Github external
def test_class(self):
        from diffprivlib.mechanisms import DPMechanism
        self.assertTrue(issubclass(GeometricFolded, DPMechanism))
github IBM / differential-privacy-library / tests / mechanisms / test_LaplaceTruncated.py View on Github external
def test_class(self):
        from diffprivlib.mechanisms import DPMechanism
        self.assertTrue(issubclass(LaplaceTruncated, DPMechanism))
github IBM / differential-privacy-library / tests / mechanisms / test_Binary.py View on Github external
def test_class(self):
        from diffprivlib.mechanisms import DPMechanism
        self.assertTrue(issubclass(Binary, DPMechanism))
github IBM / differential-privacy-library / tests / mechanisms / test_Exponential.py View on Github external
def test_class(self):
        from diffprivlib.mechanisms import DPMechanism
        self.assertTrue(issubclass(Exponential, DPMechanism))
github IBM / differential-privacy-library / tests / mechanisms / test_LaplaceBoundedNoise.py View on Github external
def test_class(self):
        from diffprivlib.mechanisms import DPMechanism
        self.assertTrue(issubclass(LaplaceBoundedNoise, DPMechanism))