def _pdf(self, x, norm_range=False): x = x.unstack_x() mu = self.params['mu'] sigma = self.params['sigma'] return z.exp((-(x - mu) ** 2) / ( 2 * sigma ** 2)) # non-normalized gaussian
def _unnormalized_pdf(self, x): x = x.unstack_x() mu = self.params['mu'] sigma = self.params['sigma'] from zfit import z return z.exp( (-(x - mu)**2) / (2 * sigma**2)) # non-normalized gaussian
def _unnormalized_pdf(self, x): lambda_ = self.params['lambda'] x = x.unstack_x() probs = z.exp(lambda_ * (self._shift_x(x))) tf.debugging.assert_all_finite(probs, f"Exponential PDF {self} has non valid values. This is likely caused" f" by numerical problems: if the exponential is too steep, this will" f" yield NaNs or infs. Make sure that your lambda is small enough and/or" f" the initial space is in the same" f" region as your data (and norm_range, if explicitly set differently)." f" If this issue still persists, please oben an issue on Github:" f" https://github.com/zfit/zfit") return probs # Don't use exp! will overflow.
def _numerics_shifted_exp(self, x, lambda_): # needed due to overflow in exp otherwise, prevents by shift return z.exp(lambda_ * (x - self._numerics_data_shift))
def _unnormalized_pdf(self, x): # implement function data = z.unstack_x(x) alpha = self.params['alpha'] return z.exp(alpha * data)
def raw_integral(x): return (z.exp(lambd * (model._shift_x(x))) / lambd ) # needed due to overflow in exp otherwise
def _unnormalized_pdf(self, x): x = x.unstack_x() mu = self.params["mu"] sigma = self.params["sigma"] return z.exp((-((x - mu) ** 2)) / (2 * sigma**2)) # non-normalized gaussian
def _func(self, x): mu = self.params['mu'] sigma = self.params['sigma'] x = z.unstack_x(x) return z.exp(-z.square((x - mu) / sigma))
def _unnormalized_pdf(self, x): mu = self.params['mu'] sigma = self.params['sigma'] x = z.unstack_x(x) return z.exp(-z.square((x - mu) / sigma))
def _func(self, x): mu = self.params["mu"] sigma = self.params["sigma"] x = z.unstack_x(x) return z.exp(-z.square((x - mu) / sigma))