Post-process an HDF5 file.#

from __future__ import annotations

from gemseo import execute_post
from gemseo import import_database

Given an HDF5 file generated from an EvaluationProblem, an OptimizationProblem or a Scenario, we can visualize the evaluation history using the function execute_post() and a specific visualization tool such as "BasicHistory":

execute_post("my_results.hdf5", post_name="BasicHistory", variable_names=["y_4"])

Note

By default, GEMSEO saves the images on the disk. Use save=False to not save figures and show=True to display them on the screen.

We can also get the raw data as a Database from this HDF5 file:

database = import_database("my_results.hdf5")

and convert it into a Dataset` to handle it more easily (see this example):

dataset = database.to_dataset()

Gallery generated by Sphinx-Gallery