Skip to content

Commit

Permalink
rename loss_increase_to_solve into translated_negative_log_likelihood
Browse files Browse the repository at this point in the history
  • Loading branch information
amatissart committed Jun 1, 2024
1 parent c7e7f8e commit f446bd1
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,11 @@ def log_likelihood_function(self) -> Callable[[npt.NDArray, npt.NDArray], float]
"""

@cached_property
def loss_increase_to_solve(self):
"""
This function is a convex negative log likelihood, translated such
that its minimum has a constant negative value at `delta=0`. The
roots of this function are used to compute the uncertainties
intervals. If it has only a single root, then uncertainty on the
def translated_negative_log_likelihood(self):
"""This function is a convex negative log likelihood, translated such
that its minimum has a constant negative value at `delta=0`. The
roots of this function are used to compute the uncertainties
intervals. If it has only a single root, then uncertainty on the
other side is considered infinite.
"""
ll_function = self.log_likelihood_function
Expand Down Expand Up @@ -162,7 +161,7 @@ def get_derivative_args(coord: int, sol: np.ndarray):
).to_numpy()
try:
uncertainties_left[coordinate] = -1 * njit_brentq(
self.loss_increase_to_solve,
self.translated_negative_log_likelihood,
args=(score_diff, r_actual, comparison_indicator, ll_actual),
xtol=1e-2,
a=-self.MAX_UNCERTAINTY,
Expand All @@ -174,7 +173,7 @@ def get_derivative_args(coord: int, sol: np.ndarray):

try:
uncertainties_right[coordinate] = njit_brentq(
self.loss_increase_to_solve,
self.translated_negative_log_likelihood,
args=(score_diff, r_actual, comparison_indicator, ll_actual),
xtol=1e-2,
a=0.0,
Expand Down

0 comments on commit f446bd1

Please sign in to comment.