Skip to content

Commit

Permalink
Fixed wrapper models.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsch420 committed Jan 16, 2024
1 parent 58edece commit 306713b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/probabilistic_model/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.5.19"
__version__ = "1.5.20"
16 changes: 8 additions & 8 deletions src/probabilistic_model/probabilistic_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,20 +228,20 @@ class ProbabilisticModelWrapper:
model: ProbabilisticModel
"""The model that is wrapped."""

def _likelihood(self, event: Iterable) -> float:
return self.model._likelihood(event)
def likelihood(self, event: Iterable) -> float:
return self.model.likelihood(event)

def _probability(self, event: EncodedEvent) -> float:
return self.model._probability(event)
def probability(self, event: Event) -> float:
return self.model.probability(event)

def _mode(self) -> Tuple[Iterable[EncodedEvent], float]:
return self.model._mode()
def mode(self) -> Tuple[List[Event], float]:
return self.model.mode()

def marginal(self, variables: Iterable[Variable]) -> Optional[Self]:
return self.model.marginal(variables)

def _conditional(self, event: EncodedEvent) -> Tuple[Optional[Self], float]:
return self.model._conditional(event)
def conditional(self, event: Event) -> Tuple[Optional[Self], float]:
return self.model.conditional(event)

def sample(self, amount: int) -> Iterable:
return self.model.sample(amount)
Expand Down

0 comments on commit 306713b

Please sign in to comment.