def training_for_sigma(sigma): print "starting debugging:" from expenv import MultiSplitSet # select dataset multi_split_set = MultiSplitSet.get(393) SPLIT_POINTER = 1 #create mock param object by freezable struct param = Options() param.kernel = "WeightedDegreeStringKernel" #"WeightedDegreeRBFKernel" # # param.wdk_degree = 2 param.cost = 1.0 param.transform = 1.0 param.id = 666 param.base_similarity = sigma param.degree = 2 param.flags = {} param.flags["wdk_rbf_on"] = False param.freeze() data_train = multi_split_set.get_train_data(SPLIT_POINTER) data_eval = multi_split_set.get_eval_data(SPLIT_POINTER) # train mymethod = Method(param) mymethod.train(data_train) print "training done" assessment = mymethod.evaluate(data_eval) print assessment assessment.destroySelf() return assessment.auROC
def main(): print "starting debugging:" SPLIT_POINTER = 1 from expenv import MultiSplitSet from helper import Options # select dataset multi_split_set = MultiSplitSet.get(399) #create mock param object by freezable struct param = Options() param.kernel = "WeightedDegreeRBFKernel" #"WeightedDegreeStringKernel"# # param.wdk_degree = 1 param.cost = 1.0 param.transform = 1.0 param.sigma = 1.0 param.id = 666 param.base_similarity = 1 param.degree = 2 param.freeze() data_train = multi_split_set.get_train_data(SPLIT_POINTER) data_eval = multi_split_set.get_eval_data(SPLIT_POINTER) # train mymethod = Method(param) mymethod.train(data_train) print "training done" assessment = mymethod.evaluate(data_eval) print assessment assessment.destroySelf()