def get_likelihood_function(self, params):
        # Set params here and return the likelihood object.
        if self.LL_stoch is None:
            raise RuntimeError("Must call StochasticInference.setup_likelihood_function before using StochasticInference.get_likelihood_function.")

        #Set params
        params_dict = {}
        for key, p in zip(self.params_to_estimate, params):
            params_dict[key] = p
        self.LL_stoch.set_init_params(params_dict)

        #Prior
        lp = self.check_prior(params_dict)
        if not np.isfinite(lp):
            return -np.inf

        LL_stoch_cost = self.LL_stoch.py_log_likelihood()
        ln_prob = lp + LL_stoch_cost
        return ln_prob