def __init__(self, n_input=1): self.n_input = n_input self.plotter = utils.Plotter() self.roc = utils.Roccer()
environ["CUDA_VISIBLE_DEVICES"] = "" import numpy as np import extra_vars from subtlenet import config, utils from subtlenet.backend import obj from subtlenet.generators.gen import make_coll basedir = environ['BASEDIR'] figsdir = environ['FIGSDIR'] n_batches = 500 partition = 'test' p = utils.Plotter() r1 = utils.Roccer(y_range=range(-5, 1)) r2 = utils.Roccer(y_range=range(-4, 1)) OUTPUT = figsdir + '/' system('mkdir -p %s' % OUTPUT) components = [ 'singletons', 'shallow', 'baseline2_7_100', 'kltest_7_100', 'categorical_crossentropy2_7_100', 'categorical_crossentropytest2_7_100', 'categorical_crossentropytesttest2_7_100', ]
bkg_hists['N2'] = roccer_hists_SS['N2'][BKG] #sig_hists['deepTagZqq'] = roccer_hists_SS['deepTagZqq'][SIG] #bkg_hists['deepTagZqq'] = roccer_hists_SS['deepTagZqq'][BKG] for model in models: for i in xrange(len(samples) if MULTICLASS else 2): roccer_hists = plot(np.linspace(0, 1, 50), lambda s, i=i: s.Yhat[model][s.vidx, i], samples, figsdir + 'class_%i_%s' % (i, model), xlabel='Class %i %s' % (i, model)) sig_hists[model] = roccer_hists[SIG] bkg_hists[model] = roccer_hists[BKG] r1 = utils.Roccer( y_range=range(0, 1), axis=[0, 1, 0, 1], ) #r1.clear() r1.add_vars(sig_hists, bkg_hists, { 'Dense': 'Dense', 'GRU': 'GRU', 'N2': 'N2', } #'deepZqq':'deepZqq'} ) r1.plot(figsdir + 'class_%s_ROC' % (str(args.version)))
environ['KERAS_BACKEND'] = 'tensorflow' environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" environ["CUDA_VISIBLE_DEVICES"] = "" import numpy as np from subtlenet import config, utils from subtlenet.backend import obj from subtlenet.generators.gen import make_coll n_batches = 500 partition = 'test' p = utils.Plotter() r = utils.Roccer() OUTPUT = environ['FIGSDIR'] + '/' system('mkdir -p %s'%OUTPUT) components = [ 'singletons', 'shallow_best', # 'trunc4_limit50_best', 'trunc7_limit100_best', ] components_gen = [ 'singletons', 'shallow_best', # 'baseline_trunc4_limit50_best', 'baseline_Adam_7_100',
environ["CUDA_VISIBLE_DEVICES"] = "" import numpy as np import extra_vars from subtlenet import config, utils from subtlenet.backend import obj from subtlenet.generators.gen import make_coll basedir = environ['BASEDIR'] figsdir = environ['FIGSDIR'] n_batches = 500 partition = 'test' p = utils.Plotter() r = utils.Roccer(y_range=range(-4, 1)) OUTPUT = figsdir + '/' system('mkdir -p %s' % OUTPUT) components = [ 'singletons', 'shallow', # 'baseline_trunc4_limit50_clf_best', # 'decorrelated_trunc4_limit50_clf_best', # 'mse_decorrelated_trunc4_limit50_clf_best', # 'emd_decorrelated_trunc4_limit50_clf_best', # 'baseline_4_50', # 'baseline_Adam_4_10', 'baseline_Adam_4_50', 'baseline_Adam_4_100',
def __init__(self, n_input=2, n_output=1): self.n_input = n_input self.n_output = n_output self.plotter = utils.Plotter() self.roc = utils.Roccer(y_range=range(-1,1))