Пример #1
0
def test_private_std(example_private_table: PrivateTable):
    """check private std implementation."""
    noisy_std = example_private_table.std('Age', PrivacyBudget(10000.))
    check_absolute_error(noisy_std, 5.54, 1.)
    del noisy_std
Пример #2
0
def test_private_std(example_private_table: PrivateTable):
    """check private std implementation using Age in adult dataset."""
    noisy_std = example_private_table.std('Age', PrivacyBudget(10000.))
    check_absolute_error(noisy_std, 13.640432553581146, 1.)
    del noisy_std
Пример #3
0
def test_private_std_petal_width(example_private_table: PrivateTable):
    """check private std implementation using Petal Width in iris dataset."""
    noisy_std = example_private_table.std('Petal Width', PrivacyBudget(10000.))
    check_absolute_error(noisy_std, 0.7631607417008414, 1.)
    del noisy_std
Пример #4
0
def test_private_std_petal_length(example_private_table: PrivateTable):
    """check private std implementation using Petal Length in iris dataset."""
    noisy_std = example_private_table.std('Petal Length', PrivacyBudget(10000.))
    check_absolute_error(noisy_std, 1.7644204199522617, 1.)
    del noisy_std
Пример #5
0
def test_private_std_sepal_width(example_private_table: PrivateTable):
    """check private std implementation using Sepal Width in iris dataset."""
    noisy_std = example_private_table.std('Sepal Width', PrivacyBudget(10000.))
    check_absolute_error(noisy_std, 0.4335943113621737, 1.)
    del noisy_std
Пример #6
0
def test_private_std_sepal_length(example_private_table: PrivateTable):
    """check private std implementation using Sepal Length in iris dataset."""
    noisy_std = example_private_table.std('Sepal Length', PrivacyBudget(10000.))
    check_absolute_error(noisy_std, 0.8280661279778629, 1.)
    del noisy_std