Calculate an estimate of theta

def _calc_theta(self):
        """Calculate an estimate of theta"""
        if self.decaying_prior:
            n_sampled = np.clip(self.alpha_ + self.beta_, 1, np.inf)
            prior_weight = 1/n_sampled
            alpha = self.alpha_ + prior_weight * self.alpha_0
            beta = self.beta_ + prior_weight * self.beta_0
        else:
            alpha = self.alpha_ + self.alpha_0
            beta = self.beta_ + self.beta_0

        # Mean of Beta-distributed rv
        self.theta_ = alpha / (alpha + beta)

        # NEW: calculate theta assuming weak prior
        if self.store_wp:
            alpha = self.alpha_ + self._wp_weight * self.alpha_0
            beta = self.beta_ + self._wp_weight * self.beta_0
            self.theta_wp_ = alpha / (alpha + beta)