The following example script shows how we perform a non-linear search of grid searches, build it into a database and extract the log_likelihood values of each grid cell:
https://github.com/Jammy2211/autolens_workspace_test/blob/main/database/directory/subhalo_slam.py
Note how a GridSearchResult is returned via the database, which has the information we need on the fit.
The following script follows the same format, but tried to do the same for a sensitivity mapping result:
https://github.com/Jammy2211/autolens_workspace_test/blob/main/database/directory/sensitivity_slam.py
The database cannot be built for this result, because sensitivity results do not support the database yet. Furthermore, the SensitivityResult class in autofit does not currently have any functionality for producing things like the log_likelihoods.
Can you extend autofit such that the print statements at the end of the code behave as expected:
"""
__Query__
"""
agg_grid = agg.grid_searches()
"""
Unique Tag Query Does Not Work
"""
agg_best_fits = agg_grid.best_fits()
fit_imaging_agg = al.agg.FitImagingAgg(aggregator=agg_best_fits)
fit_imaging_gen = fit_imaging_agg.max_log_likelihood_gen_from()
info_gen = agg_best_fits.values("info")
for fit_grid, fit_imaging_detect, info in zip(agg_grid, fit_imaging_gen, info_gen):
"""
This should return an instance of the `SensitivityResult` object.
"""
sensitivity_result = fit_grid["result"]
"""
The log likelihoods of the base fits, perturbed fits and their difference.
"""
print(sensitivity_result.log_likelihoods_base_native)
print(sensitivity_result.log_likelihoods_perturbed_native)
print(sensitivity_result.log_likelihoods_increase_native)
The following example script shows how we perform a non-linear search of grid searches, build it into a database and extract the
log_likelihoodvalues of each grid cell:https://github.com/Jammy2211/autolens_workspace_test/blob/main/database/directory/subhalo_slam.py
Note how a
GridSearchResultis returned via the database, which has the information we need on the fit.The following script follows the same format, but tried to do the same for a sensitivity mapping result:
https://github.com/Jammy2211/autolens_workspace_test/blob/main/database/directory/sensitivity_slam.py
The database cannot be built for this result, because sensitivity results do not support the database yet. Furthermore, the
SensitivityResultclass in autofit does not currently have any functionality for producing things like thelog_likelihoods.Can you extend autofit such that the print statements at the end of the code behave as expected: