Esempio n. 1
0
def gabelopsitu():
    runevaler("opsitu",
              2000,
              GabelTrainer,
              GabelTorchEvaler,
              eval_gabel_ann,
              networklayers=[70, 50, 20],
              lr=.03,
              dropoutrate=0.3,
              validate_on_k=10,
              filenamepostfix="gabel")
Esempio n. 2
0
def esnniris():
    runevaler("iris",
              200,
              ESNNSystem,
              TorchEvaler,
              eval_dual_ann,
              networklayers=[40, 10, 2],
              lr=.02,
              dropoutrate=0.05,
              validate_on_k=10,
              filenamepostfix="esnn")
Esempio n. 3
0
def gabeliris():
    runevaler("iris",
              2000,
              GabelTrainer,
              GabelTorchEvaler,
              eval_dual_ann,
              networklayers=[40, 40, 40],
              lr=.01,
              dropoutrate=0.00,
              validate_on_k=10,
              filenamepostfix="gabel")
Esempio n. 4
0
def choprairis():
    runevaler("iris",
              200,
              ChopraTrainer,
              ChopraTorchEvaler,
              eval_dual_ann,
              networklayers=[40, 40],
              lr=.05,
              dropoutrate=0.05,
              validate_on_k=10,
              filenamepostfix="chopra")
Esempio n. 5
0
def testTorchESNNOPSITU2(datasetname, epochs, eval_on_k, filename):

    runevaler(datasetname,
              epochs,
              ESNNSystem,
              TorchEvaler,
              eval_dual_ann,
              networklayers=[40, 40, 40],
              lr=.09,
              dropoutrate=0.5,
              eval_on_k=eval_on_k,
              filenamepostfix=filename)
Esempio n. 6
0
def plotGableOpsitu(lr=0.03,
                    networklayers=[50, 30, 3],
                    dropout=0.05,
                    epochs=200,
                    validate_on_k=10,
                    n=5):
    model, \
    dsl, \
    train, \
    test, \
    evaler, \
    best_model, \
    losses, \
    lossdf = runevaler("opsitu", epochs, GabelTrainer, GabelTorchEvaler,
              eval_gabel_ann, networklayers=networklayers,
              lr=lr, dropoutrate=dropout, validate_on_k=validate_on_k, n=n,
              filenamepostfix="gabel")
    df1 = makematrixdata(best_model,
                         dsl.getFeatures()[train],
                         dsl.getTargets()[train],
                         10,
                         type=1)
    plot2heatmap(df1, 10, annot=True, outputfile="gabel-matrix.pdf")

    df2 = makematrixdata(model,
                         dsl.getFeatures()[train],
                         dsl.getTargets()[train],
                         10,
                         type=1)
    plot2heatmap(df2, 10, annot=True, outputfile="training-gabel-matrix.pdf")
    return losses, lossdf
Esempio n. 7
0
def plotCHOPRAOpsitu(lr=0.2,
                     networklayers=[50, 30, 3],
                     dropout=0.05,
                     epochs=200,
                     validate_on_k=10,
                     n=5):
    model, \
    dsl, \
    train, \
    test, \
    evaler, \
    best_model, \
    losses,\
    lossdf  = runevaler("opsitu", epochs, ChopraTrainer, ChopraTorchEvaler,
                           eval_dual_ann, networklayers=networklayers, lr=lr,
                           dropoutrate=dropout, validate_on_k=validate_on_k, n=n, filenamepostfix="chopra")

    df = makematrixdata(best_model,
                        dsl.getFeatures()[train],
                        dsl.getTargets()[train],
                        10,
                        type=2)
    plot2heatmap(df, 10, annot=True, outputfile="chopra-matrix.pdf")

    df = makematrixdata(model,
                        dsl.getFeatures()[train],
                        dsl.getTargets()[train],
                        10,
                        type=2)
    plot2heatmap(df, 10, annot=True, outputfile="training-chopra-matrix.pdf")
    return losses, lossdf
Esempio n. 8
0
def esnnopsitu():
    model, \
        test_data, \
        test_target, \
        evaler,\
        best_model = runevaler("opsitu", 200, ESNNSystem, TorchEvaler,
                               eval_dual_ann, networklayers=[70, 20, 3], lr=.02,
                               dropoutrate=0.05, validate_on_k=10, filenamepostfix="esnn")
    return model, best_model, test_data, test_target
Esempio n. 9
0
def chopraopsitu():
    model, \
        test_data, \
        test_target, \
        evaler, \
        best_model = runevaler("opsitu", 2000, ChopraTrainer, ChopraTorchEvaler,
                               eval_dual_ann, networklayers=[30, 10, 2],
                               lr=.01, dropoutrate=0.02, validate_on_k=10,
                               filenamepostfix="chopra")
    print(model(evaler.x1s[0:1, ], evaler.x1s[0:1, ]))
    print(model(evaler.x1s[1:2, ], evaler.x1s[1:2, ]))
    print(model(evaler.x1s[1:2, ], evaler.x1s[0:1, ]))