def run_bayes_split(parents=1): global filename, testName jvm_helper = classify.cw2_helper() BayesCls_split = classify.cw2_classifier() BayesCls_split.load_data_split(filename, 80) BayesCls_split.run_bayes_split("results/" + str(testName), parents) BayesCls_split = classify.cw2_classifier() BayesCls_split.load_data_split(filename, 80) BayesCls_split.run_bayes_hill_split("results/" + str(testName), parents) BayesCls_split = classify.cw2_classifier() BayesCls_split.load_data_split(filename, 80) BayesCls_split.run_bayes_tan_split("results/" + str(testName), parents)
def run_ibk_split(args): global filename, testName jvm_helper = classify.cw2_helper() ibkCls = classify.cw2_classifier() ibkCls.load_data_split(filename, 80) ibkCls.run_ibk_split("results/" + str(testName))
def run_ibk_crossval(args): global filename, testName jvm_helper = classify.cw2_helper() ibkCls_crossval = classify.cw2_classifier() ibkCls_crossval.load_data(filename) ibkCls_crossval.run_ibk_crossval("results/" + str(testName))
def run_simplekm_with_class(args): global filename, testName jvm_helper = classify.cw2_helper() simplek_full = classify.cw2_classifier() simplek_full.load_data(filename, True) simplek_full.run_cluster_simplek("results/" + str(testName), False, 7)
def run_nb_crossval(args): global filename, testName jvm_helper = classify.cw2_helper() naiveBayesCls_crossval = classify.cw2_classifier() naiveBayesCls_crossval.load_data(filename) naiveBayesCls_crossval.run_naive_bayes_crossval("results/" + str(testName))
def run_nb_split(args): global filename, testName jvm_helper = classify.cw2_helper() naiveBayesCls = classify.cw2_classifier() naiveBayesCls.load_data_split(filename, 80) naiveBayesCls.run_naive_bayes_split("results/" + str(testName))
def run_clusters_auto1(num_clusters): global filename, testName jvm_helper = classify.cw2_helper() simplek_full = classify.cw2_classifier() simplek_full.load_data(filename) clusterList = [2, 4, 7, 10, 15] for clusterNum in clusterList: simplek_full.run_clustering_task7_manual("results/" + str(testName), "weka.clusterers.EM", clusterNum)
def run_clusters_manual(num_clusters): global filename, testName jvm_helper = classify.cw2_helper() simplek_full = classify.cw2_classifier() simplek_full.load_data(filename) simplek_full.run_clustering_task7_manual("results/" + str(testName), "weka.clusterers.FarthestFirst", num_clusters) simplek_full.run_clustering_task7_manual("results/" + str(testName), "weka.clusterers.SimpleKMeans", num_clusters)
def test_seeds_manual(args): global filename, testName jvm_helper = classify.cw2_helper() simplek_full = classify.cw2_classifier() simplek_full.load_data(filename) clusterNum = 7 seedList = [1, 10, 20, 40, 50, 80, 100, 150] for seed in seedList: simplek_full.run_clustering_task7_manual("results/" + str(testName), "weka.clusterers.EM", clusterNum, seed) simplek_full.run_clustering_task7_manual( "results/" + str(testName), "weka.clusterers.FarthestFirst", clusterNum, seed)
def run_clusters_auto2(num_clusters): global filename, testName jvm_helper = classify.cw2_helper() simplek_full = classify.cw2_classifier() simplek_full.load_data(filename)