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

Feature/likelihood check #987

Merged
merged 22 commits into from
Apr 8, 2024
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
result now only uses samples summary for prior linking
Jammy2211 committed Mar 22, 2024

Unverified

No user is associated with the committer email.
commit e3d2112066cdc250d6f764e9703f846bad55c1b0
13 changes: 7 additions & 6 deletions autofit/non_linear/result.py
Original file line number Diff line number Diff line change
@@ -120,7 +120,7 @@ def model_absolute(self, a: float) -> AbstractPriorModel:
A model mapper created by taking results from this search and creating priors with the defined absolute
width.
"""
return self.samples.model_absolute(a)
return self.samples_summary.model_absolute(a)

def model_relative(self, r: float) -> AbstractPriorModel:
"""
@@ -143,7 +143,7 @@ def model_relative(self, r: float) -> AbstractPriorModel:
A model mapper created by taking results from this search and creating priors with the defined relative
width.
"""
return self.samples.model_relative(r)
return self.samples_summary.model_relative(r)

def model_bounded(self, b: float) -> AbstractPriorModel:
"""
@@ -165,7 +165,7 @@ def model_bounded(self, b: float) -> AbstractPriorModel:
A model mapper created by taking results from this search and creating priors with the defined bounded
uniform priors.
"""
return self.samples.model_bounded(b)
return self.samples_summary.model_bounded(b)


class Result(AbstractResult):
@@ -204,7 +204,8 @@ def dict(self) -> dict:
Human-readable dictionary representation of the results
"""
return {
"max_log_likelihood": self.samples.max_log_likelihood_sample.model_dict(),
"max_log_likelihood": self.samples_summary.max_log_likelihood_sample.model_dict(),
"median pdf": self.samples_summary.median_pdf.model_dict(),
}

@property
@@ -231,8 +232,8 @@ def projected_model(self) -> AbstractPriorModel:
@property
def model(self):
if self.__model is None:
self.__model = self.samples.model.mapper_from_prior_means(
means=self.samples.prior_means
self.__model = self.model.mapper_from_prior_means(
means=self.samples_summary.prior_means
)

return self.__model