Ejemplo n.º 1
0
def run_fetc():

    if "-exp" in sys.argv:
        exp_pos = sys.argv.index("-exp")
        param_file = sys.argv[exp_pos+1]
    else:
        param_file = "experiment.yaml"

    exp = read_parameters(param_file=param_file)

    ovw = parse_commandline(sys.argv)
    overwrite_params(exp, ovw)

    update_parameters(exp)

    #print exp

    if exp['steps']['extract_features']:
        fe = FeatureExtractor.create(params=exp)
        fe.run()

    if exp['steps']['aggregate_features']:
        fa = FeatureAggregator.create(params=exp)
        fa.run()

    if exp['steps']['train']:
        t = ModelTrainer.create(params=exp)
        t.run()

    if exp['steps']['test']:
        t = ModelTester.create(params=exp)
        t.run()


    if exp['steps']['evaluate']:
        t = Evaluator.create(params=exp)
        t.run()
Ejemplo n.º 2
0
def run_fetc():

    if "-exp" in sys.argv:
        exp_pos = sys.argv.index("-exp")
        param_file = sys.argv[exp_pos + 1]
    else:
        param_file = "experiment.yaml"

    exp = read_parameters(param_file=param_file)

    ovw = parse_commandline(sys.argv)
    overwrite_params(exp, ovw)

    update_parameters(exp)

    #print exp

    if exp['steps']['extract_features']:
        fe = FeatureExtractor.create(params=exp)
        fe.run()

    if exp['steps']['aggregate_features']:
        fa = FeatureAggregator.create(params=exp)
        fa.run()

    if exp['steps']['train']:
        t = ModelTrainer.create(params=exp)
        t.run()

    if exp['steps']['test']:
        t = ModelTester.create(params=exp)
        t.run()

    if exp['steps']['evaluate']:
        t = Evaluator.create(params=exp)
        t.run()