View Bootstrap with weighting.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View covariance_to_correlation.py
import numpy as np
def correlation_from_covariance(covariance):
v = np.sqrt(np.diag(covariance))
outer_v = np.outer(v, v)
correlation = covariance / outer_v
correlation[covariance == 0] = 0
return correlation
View RoundingError.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View loop_rooargset.py
def loop_iterator(iterator):
object = iterator.Next()
while object:
yield object
object = iterator.Next()
def iter_collection(rooAbsCollection):
iterator = rooAbsCollection.createIterator()
return loop_iterator(iterator)
View newton optimization.py
import numpy as np
import tensorflow as tf
# Newton's optimization method for multivariate function in tensorflow
def cons(x):
return tf.constant(x, dtype=tf.float32)
def compute_hessian(fn, vars):
mat = []
View 4Stefano.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View safe_roofit.py
def safe_factory(func):
def wrapper(self, *args):
result = func(self, *args)
if not result:
raise ValueError('invalid factory input "%s"' % args)
return result
return wrapper
ROOT.RooWorkspace.factory = safe_factory(ROOT.RooWorkspace.factory)
View CartPole-v0.py
# from http://kvfrans.com/simple-algoritms-for-solving-cartpole/
import gym
from gym import wrappers
import numpy as np
env = gym.make('CartPole-v0')
def run_episode(env, parameters):
observation = env.reset()
View pisa
# Ricerca di fisica esotica a LHC con risonanze a due corpi
## E/gamma energy calibration
* multivariate regression optimized on MC to calibrate the energy of electron / converted / unconverted photons
* intercalibration of calorimeter layers from 2012 + additional uncertainty
* energy scale and resolution corrections validated with 13 TeV $Z\to ee$
* For $E>100-200$ GeV resolution dominated by the constant term $c=0.6%-1.5%$
* Scale uncertainty (0.4%-2%) for diphoton analysis
* Preliminary photon energy resolution at 300 GeV: $\pm 80\%-100\%$
View UncorrelatedCategories.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.