예제 #1
0
파일: main.py 프로젝트: jahuth/ni
	m = models[cell][sorted(models[cell].keys())[model]]
	with View(job_path + '_results.html') as view:
		b = bootstrap.bootstrap_trials(50,m,data,test_data=[test_data],shuffle=True)
		stats.addNode(m.name,b)
		for (dim, name) in [('EIC','EIC')]:
			with view.figure("Cells/tabs/Cell "+str(cell)+"/tabs/"+str(name)):
				plot(stats.get(dim))
		for k in stats.keys():
			with view.figure("Cells/tabs/Cell "+str(cell)+"/tabs/Betas/tabs/"+str(k)):
				for b in stats.filter(k).get('beta'): 
					plot(b)
				for b in stats.filter(k).get('boot_betas'): 
					for bb in b:
						plot(bb,'--')
		view.render(job_path + '_results.html')
		stats.save(path + identifier  + E1 + '_' + str(cell) + "_" + str(m.name).replace("/","_") + '_stats.stat')
job "E1.2. Saving Data":
	require previous
	stats.load_glob(path + identifier + E1 + '_*_Model*_stats.stat')
	stats.save(path + identifier + E1 + '_all_models.stat')

job "E1b.1. Evaluate Models for Trial Reshuffling" for cell in model_cells for model in range(len(models[0])):
	m = models[cell][sorted(models[cell].keys())[model]]
	with View(job_path + '_results.html') as view:
		b = bootstrap.bootstrap_time(50,m,data,test_data=[test_data])
		stats.addNode(m.name,b)
		for (dim, name) in [('EIC','EIC')]:
			with view.figure("Cells/tabs/Cell "+str(cell)+"/tabs/"+str(name)):
				plot(stats.get(dim))
		for k in stats.keys():
			with view.figure("Cells/tabs/Cell "+str(cell)+"/tabs/Betas/tabs/"+str(k)):
	m = models[cell][sorted(models[cell].keys())[model]]
	with View(job_path + '_results.html') as view:
		b = bootstrap.bootstrap_trials(50,m,data,test_data=[test_data])
		stats.addNode(m.name,b)
		for (dim, name) in [('EIC','EIC')]:
			with view.figure("Cells/tabs/Cell "+str(cell)+"/tabs/"+str(name)):
				plot(stats.get(dim))
		for k in stats.keys():
			with view.figure("Cells/tabs/Cell "+str(cell)+"/tabs/Betas/tabs/"+str(k)):
				for b in stats.filter(k).get('beta'): 
					plot(b)
				for b in stats.filter(k).get('boot_betas'): 
					for bb in b:
						plot(bb,'--')
		view.render(job_path + '_results.html')
		stats.save(path + identifier  + E1 + '_' + str(cell) + "_" + str(m.name).replace("/","_") + '_stats.stat')
job "E1.2. Saving Data":
	require previous
	stats.load_glob(path + identifier + E1 + '_*_Model*_stats.stat')
	stats.save(path + identifier + E1 + '_all_models.stat')

job "E1b.1. Evaluate Models for Trial Reshuffling" for cell in model_cells for model in range(len(models[0])):
	m = models[cell][sorted(models[cell].keys())[model]]
	with View(job_path + '_results.html') as view:
		b = bootstrap.bootstrap_time(50,m,data,test_data=[test_data])
		stats.addNode(m.name,b)
		for (dim, name) in [('EIC','EIC')]:
			with view.figure("Cells/tabs/Cell "+str(cell)+"/tabs/"+str(name)):
				plot(stats.get(dim))
		for k in stats.keys():
			with view.figure("Cells/tabs/Cell "+str(cell)+"/tabs/Betas/tabs/"+str(k)):