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

Sensitivity result output formatting #1033

Closed
Jammy2211 opened this issue Aug 2, 2024 · 0 comments · Fixed by #1052
Closed

Sensitivity result output formatting #1033

Jammy2211 opened this issue Aug 2, 2024 · 0 comments · Fixed by #1052
Assignees

Comments

@Jammy2211
Copy link
Collaborator

The sensitivity result produced by this script:

https://github.com/Jammy2211/autofit_workspace/blob/release/scripts/features/sensitivity_mapping.py

Looks like this:

index,normalization,log_evidence_increase,log_likelihood_increase
     0,25.0075,5436.927362178276,5434.422459868222

Could you make it so there is white space in the formatting so its more readable?

Note that the output of grid searches uses the method write_table:

        def write_results():
            self.logger.debug("Writing results")

            os.makedirs(self.paths.output_path, exist_ok=True)

            is_evidence = any(row[-1] is not None for row in results_list)

            headers = [
                "index",
                *map(model.name_for_prior, grid_priors),
                "log_likelihood_increase",
            ]
            rows = results_list

            if is_evidence:
                headers.append("log_evidence")
            else:
                rows = [row[:-1] for row in rows]

            write_table(
                headers,
                rows,
                self.paths.output_path / "results.csv",
            )

Which produces well formatted output, so I think we just need to update the sensitivity mapping output to use this funciton.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants