示例#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')