Пример #1
0
def test_ring():
    run(IdentitySynthesizer, iterations=1, datasets=['ring'])
Пример #2
0
def test_mnist28():
    run(IdentitySynthesizer, iterations=1, datasets=['mnist28'])
Пример #3
0
def test_news():
    run(IdentitySynthesizer, iterations=1, datasets=['news'])
Пример #4
0
def test_insurance():
    run(IdentitySynthesizer, iterations=1, datasets=['insurance'])
Пример #5
0
def test_intrusion():
    run(IdentitySynthesizer, iterations=1, datasets=['intrusion'])
Пример #6
0
def test_credit():
    run(IdentitySynthesizer, iterations=1, datasets=['credit'])
Пример #7
0
def test_gridr():
    run(IdentitySynthesizer, iterations=1, datasets=['gridr'])
Пример #8
0
def test_child():
    run(IdentitySynthesizer, iterations=1, datasets=['child'])
Пример #9
0
def test_covtype():
    run(IdentitySynthesizer, iterations=1, datasets=['covtype'])
Пример #10
0
def test_census():
    run(IdentitySynthesizer, iterations=1, datasets=['census'])
Пример #11
0
def test_asia():
    run(IdentitySynthesizer, iterations=1, datasets=['asia'])
Пример #12
0
def test_alarm():
    run(IdentitySynthesizer, iterations=1, datasets=['alarm'])
Пример #13
0
def test_adult():
    run(IdentitySynthesizer, iterations=1, datasets=['adult'])
Пример #14
0
    VEEGANSynthesizer,
)

NO_INIT = (
    CLBNSynthesizer,
    IndependentSynthesizer,
    IdentitySynthesizer,
    UniformSynthesizer,
    PrivBNSynthesizer,
)

if __name__ == '__main__':
    # This is to be run locally by hand, as some synthesizers take
    # a long time and might fail in travis
    #
    # Run as:
    #
    #     $ python tests/test_synthesizers.py

    logging.basicConfig(level=logging.INFO)

    for synthesizer_class in EPOCHS_SYNTHS:
        synthesizer = synthesizer_class(epochs=1)
        run(synthesizer.fit_sample, datasets=['adult'], repeat=1)

    for synthesizer_class in NO_INIT:
        synthesizer = synthesizer_class()
        run(synthesizer.fit_sample, datasets=['adult'], repeat=1)

    logging.info('All the synthesizers were executed successfully')