Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update LogPosterior class structure #510

Closed
BradyPlanden opened this issue Sep 17, 2024 · 0 comments · Fixed by #512
Closed

Update LogPosterior class structure #510

BradyPlanden opened this issue Sep 17, 2024 · 0 comments · Fixed by #512
Labels
enhancement New feature or request

Comments

@BradyPlanden
Copy link
Member

BradyPlanden commented Sep 17, 2024

Feature description

The attribute interaction between LogPosterior and BaseCost is quite complex and unclear in places. The issue is to refactor the structure of LogPosterior so that the attributes currently copied from the likelihood class can be updated as properties instead. One way to achieve this would be to create a new parent class for meta-cost-like classes that operates on individual cost classes. One such instance would be LogPosterior, but WeightedCost could also be included.

A few goals to achieve:

  • Reduce the complexity of the self.parameters attribute interaction between GaussianLogLikelihood, LogPosterior and BaseCost.
  • LogPosterior's attributes should point to the likelihood classes, rather than copying them as needed.
  • LogPosterior should not inherit from BaseCost if possible, or if it does, the attributes constructed in the BaseCost parent should be deleted when the likelihood attributes are used instead (the former is really the preference here).

Motivation

See discussion on #505.

Possible implementation

No response

Additional context

No response

@BradyPlanden BradyPlanden added the enhancement New feature or request label Sep 17, 2024
@BradyPlanden BradyPlanden linked a pull request Sep 18, 2024 that will close this issue
15 tasks
BradyPlanden added a commit that referenced this issue Sep 23, 2024
…-structure

LogPosterior refactor, partial fix for #510
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant