Validation case result
validation_case_result
¶
Classes¶
ValidationCaseResult
dataclass
¶
ValidationCaseResult(
metadata: ToolResultMetadata = ToolResultMetadata(),
element_wise_metrics: IODataset | None = None,
integrated_metrics: (
Mapping[str, Mapping[str, float]] | None
) = None,
stochastic_point_results: Sequence[
ValidationPointResult
] = (),
)
Bases: BaseResult
The result of a validation case.
Attributes¶
integrated_metrics
class-attribute
instance-attribute
¶
integrated_metrics: (
Mapping[str, Mapping[str, float]] | None
) = None
A dictionary mapping variable names and metric names to integrated metric values corresponding the each validation point (i.e. each sample of the reference data).
metadata
class-attribute
instance-attribute
¶
metadata: ToolResultMetadata = field(
default_factory=ToolResultMetadata
)
ToolResultMetadata attached to a result.
Methods:¶
add_averaged_point
¶
add_averaged_point(
src_group_name: str,
dataset: Dataset,
data: dict[str, list],
output_group_name: str,
)
Average validation point data and add to case dictionary.
Source code in src\vimseo\tools\validation_case\validation_case_result.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | |
from_hdf5
classmethod
¶
from_hdf5(path: str | Path)
Deserialize from a file path.
Source code in src\vimseo\tools\base_result.py
92 93 94 95 96 | |
from_hdf5_buffer
classmethod
¶
from_hdf5_buffer(buffer: IOBase | bytes)
Deserialize from a file-like object or bytes (e.g. Streamlit uploader).
Source code in src\vimseo\tools\base_result.py
98 99 100 101 102 103 104 105 106 | |
get_common_values
¶
get_common_values(data_list: Sequence[list]) -> list
Get the common values across all lists in data_list.
Source code in src\vimseo\tools\validation_case\validation_case_result.py
56 57 58 59 60 61 | |
save_metadata_to_disk
¶
save_metadata_to_disk(file_path: Path | str = '')
Save metadata to disk in a readable format.
Source code in src\vimseo\tools\base_result.py
118 119 120 121 122 123 124 | |
to_hdf5
¶
to_hdf5(path: str | Path) -> None
Serialize a BaseResult into an HDF5 file.
The file can be explored with an on-line reader, like https://myhdf5.hdfgroup.org/. For more information about hdf5, see HDF5 documentation.
Source code in src\vimseo\tools\base_result.py
70 71 72 73 74 75 76 77 78 79 80 | |
to_hdf5_buffer
¶
to_hdf5_buffer() -> BytesIO
Serialize a BaseResult into an HDF5 buffer.
Source code in src\vimseo\tools\base_result.py
82 83 84 85 86 87 88 89 90 | |
to_pickle
¶
to_pickle(file_path: str | Path)
Save result instance to disk.
Source code in src\vimseo\tools\base_result.py
64 65 66 67 | |