Beispiel #1
0
def main():
	top_dir = os.getcwd()

	raw_dir = 'home/' + function.get_paths()['TRAIN_DATA_DIR_PATH']
	cmd = 'python util/gen_Train+Valid.py {0}Train.csv {0}Valid.csv {0}ValidSolution.csv auxiliary_data/Train+Valid.csv'.format(function.get_paths()['TRAIN_DATA_DIR_PATH'])
	print cmd
	os.system(cmd)
	
	function.generate_features(raw_dir, raw_dir+'Train.csv', raw_dir+'Valid.csv', '_train.f', '_valid.f')
	os.chdir(top_dir)
	
	concate_features()
	os.chdir(top_dir)
	
	set_list = ['all', 'Kmeans']
	merge_train_and_valid(set_list, raw_dir)
	os.chdir(top_dir)

	train()
	os.chdir(top_dir)
Beispiel #2
0
def main():

	top_dir = os.getcwd()
	raw_dir = 'home/' + function.get_paths()['TRAIN_DATA_DIR_PATH']
	aux_dir = 'home/auxiliary_data/'
	test_path = 'home/' + function.get_paths()['TEST_DATA_PATH']
	function.generate_features(raw_dir, aux_dir+'dummyTrain.csv', test_path, '_null.f', '_test.f')
	os.chdir(top_dir)
	
	concate_features()
	os.chdir(top_dir)
	
	predict(test_path)
	os.chdir(top_dir)
	
	weighted_average()
	os.chdir(top_dir)

	postprocess(test_path)
	os.chdir(top_dir)
Beispiel #3
0
def main():

    top_dir = os.getcwd()
    raw_dir = 'home/' + function.get_paths()['TRAIN_DATA_DIR_PATH']
    aux_dir = 'home/auxiliary_data/'
    test_path = 'home/' + function.get_paths()['TEST_DATA_PATH']
    function.generate_features(raw_dir, aux_dir + 'dummyTrain.csv', test_path,
                               '_null.f', '_test.f')
    os.chdir(top_dir)

    concate_features()
    os.chdir(top_dir)

    predict(test_path)
    os.chdir(top_dir)

    weighted_average()
    os.chdir(top_dir)

    postprocess(test_path)
    os.chdir(top_dir)
Beispiel #4
0
def main():
    top_dir = os.getcwd()

    raw_dir = 'home/' + function.get_paths()['TRAIN_DATA_DIR_PATH']
    cmd = 'python util/gen_Train+Valid.py {0}Train.csv {0}Valid.csv {0}ValidSolution.csv auxiliary_data/Train+Valid.csv'.format(
        function.get_paths()['TRAIN_DATA_DIR_PATH'])
    print cmd
    os.system(cmd)

    function.generate_features(raw_dir, raw_dir + 'Train.csv',
                               raw_dir + 'Valid.csv', '_train.f', '_valid.f')
    os.chdir(top_dir)

    concate_features()
    os.chdir(top_dir)

    set_list = ['all', 'Kmeans']
    merge_train_and_valid(set_list, raw_dir)
    os.chdir(top_dir)

    train()
    os.chdir(top_dir)