try: features = features.feature_sets[args.feats] except KeyError: parser.error("unknown feature group: {0}".format(args.feats)) l = repeat.RepeatLearner( liblinear.liblinearL(svm_type=0, output_probability=True)) store = Store(args.feat_store, 'r') # TODO: Do we want this read-only? for feature in features: spaces[feature] = store.get_Space(feature) spaces['ebmcat'] = store.get_Space('ebmcat') proxy = DataProxy(ALTA2012Full(), store=store) proxy.class_space = class_space L0_cl = [] L1_fv = [] L1_gs = None for feat in features: proxy.feature_spaces = feat proxy.split_name = 'crossvalidation' with Timer() as L0_timer: L0_cl.append(l(proxy.featuremap.raw, proxy.classmap.raw)) print >> sys.stderr, "== training L0 for {0} took {1:.2f}s ==".format( feat, L0_timer.elapsed) with Timer() as L1_cv_timer: e = Experiment(proxy, l)
class_space = 'ebmcat' try: features = features.feature_sets[args.feats] except KeyError: parser.error("unknown feature group: {0}".format(args.feats)) l = repeat.RepeatLearner(liblinear.liblinearL(svm_type=0, output_probability=True)) store = Store(args.feat_store, 'r') # TODO: Do we want this read-only? for feature in features: spaces[feature] = store.get_Space(feature) spaces['ebmcat'] = store.get_Space('ebmcat') proxy = DataProxy(ALTA2012Full(), store=store) proxy.class_space = class_space L0_cl = [] L1_fv = [] L1_gs = None for feat in features: proxy.feature_spaces = feat proxy.split_name = 'crossvalidation' with Timer() as L0_timer: L0_cl.append( l(proxy.featuremap.raw, proxy.classmap.raw) ) print >>sys.stderr, "== training L0 for {0} took {1:.2f}s ==".format(feat, L0_timer.elapsed) with Timer() as L1_cv_timer: e = Experiment(proxy, l) if L1_gs is None: