Plot package#
Submodules#
Categorical plot module#
- class ablator.analysis.plot.cat_plot.ViolinPlot(*args, **kwargs)[source]#
Bases:
Categorical
Plot analysis module#
- class ablator.analysis.plot.main.PlotAnalysis(results: DataFrame, categorical_attributes: list[str], numerical_attributes: list[str], optim_metrics: dict[str, ablator.main.configs.Optim], save_dir: str | None = None, cache=False)[source]#
Bases:
Analysis
Class for analyzing plotting
Numerical plot module module#
Plotting utilities module#
- ablator.analysis.plot.utils.parse_name_remap(defaults: list[str] | None = None, name_map: dict[str, str] | None = None) dict[str, str] [source]#
Returns a dictionary mapping input attribute names to output attribute names, with optional remapping based on
name_map
.- Parameters:
- defaultslist of str or None, optional
The default attribute names to use as keys in the output dictionary. If
None
, the output dictionary will be based onname_map
only.- name_mapdict of str to str or None, optional
A dictionary mapping input attribute names to output attribute names. If
None
, the output dictionary will be based ondefaults
only.
- Returns:
- dict of str to str
A dictionary mapping input attribute names to output attribute names.
- Raises:
- NotImplementedError
If
defaults
andname_map
are bothNone
.
Examples
>>> defaults = ["attr1", "attr2", "attr3"] >>> name_map = {"attr2": "new_attr2", "attr4": "attr4_renamed"} >>> name_remap = parse_name_remap(defaults, name_map) >>> assert name_remap == {"attr1": "attr1", "attr2": "new_attr2", "attr3": "attr3"} >>> name_remap = parse_name_remap(defaults) >>> assert name_remap == {"attr1": "attr1", "attr2": "attr2", "attr3": "attr3"} >>> name_remap = parse_name_remap(name_map=name_map) >>> assert name_remap == {"attr2": "new_attr2", "attr4": "attr4_renamed"}