lf2i.plot package#

Submodules#

lf2i.plot.coverage_diagnostics module#

lf2i.plot.coverage_diagnostics.coverage_probability_plot(parameters: ndarray, coverage_probability: ndarray, confidence_level: float, param_dim: int, upper_proba: ndarray | None = None, lower_proba: ndarray | None = None, save_fig_path: str | None = None, figsize: Tuple = (10, 15), ylims: Tuple = (0, 1), params_labels: Tuple[str] | List[str] | None = None, vmin_vmax: Tuple | List | None = None, custom_ax: Axes | None = None, show_text: bool = False, show_undercoverage: bool = False) None[source]#
lf2i.plot.coverage_diagnostics.coverage_regions_plot(parameters: ndarray, confidence_level: float, coverage_probability: ndarray, upper_proba: ndarray, lower_proba: ndarray, param_dim: int, params_labels: Tuple[str] | List[str] | None = None, figsize: Tuple = (5, 5), save_fig_path: str | None = None, custom_ax: Axes | None = None) None[source]#
lf2i.plot.coverage_diagnostics.coverage_pairplot(plot_type: str, parameters: ndarray, probabilities: Dict[str, Dict[str, ndarray]] | ndarray, confidence_level: float, diagnostics_estimator: Any | None = None, aggregate_fun: str | None = None, vmin_vmax: Sequence[float] | None = None, params_labels: Sequence | None = None, plot_title: str | None = None, figsize: Tuple = (15, 15), save_fig_path: str | None = None, **kwargs) None[source]#
lf2i.plot.coverage_diagnostics.coverage_barplot(confidence_level: float, mean_proba: ndarray, upper_proba: ndarray | None = None, lower_proba: ndarray | None = None, save_fig_path: str | None = None, tol: float | None = None, figsize: Tuple = (5, 5)) None[source]#
lf2i.plot.coverage_diagnostics.coverage_boxplot(probabilities: Sequence[ndarray], labels: Sequence[str], confidence_level: float, whiskers_loc: Tuple[float, float] | float = 1.5, plot_fliers: bool = True, ylim: Sequence[float] | None = None, save_fig_path: str | None = None, figsize: Tuple = (5, 5)) None[source]#

lf2i.plot.miscellanea module#

lf2i.plot.miscellanea.hist_pairplot(data: ndarray, save_fig_path: str | None = None, figsize: Tuple = (15, 15), labels: Tuple | List | None = None) None[source]#
lf2i.plot.miscellanea.check_probs_classifier(y_true: ndarray, y_pred_positive_proba: ndarray, parameters: ndarray, confidence_level: float, param_dim: int, params_labels: Sequence | None = None, figsize: Tuple = (15, 15), save_fig_path: str | None = None) None[source]#
lf2i.plot.miscellanea.PolygonPathFixed(polygon)[source]#

FIXED: shapely changed how it handles Polygon exteriors and descartes hasn’t been updated. Constructs a compound matplotlib path from a Shapely or GeoJSON-like geometric object

lf2i.plot.miscellanea.PolygonPatchFixed(polygon, **kwargs)[source]#

FIXED: shapely changed how it handles Polygon exteriors and descartes hasn’t been updated. Constructs a matplotlib patch from a geometric object

The polygon may be a Shapely or GeoJSON-like object with or without holes. The kwargs are those supported by the matplotlib.patches.Polygon class constructor. Returns an instance of matplotlib.patches.PathPatch.

Example (using Shapely Point and a matplotlib axes):

>>> b = Point(0, 0).buffer(1.0)
>>> patch = PolygonPatch(b, fc='blue', ec='blue', alpha=0.5)
>>> axis.add_patch(patch)

lf2i.plot.parameter_regions module#

lf2i.plot.parameter_regions.plot_parameter_region(parameter_region: ndarray, param_dim: int, true_parameter: ndarray | None = None, parameter_space_bounds: Dict[str, float] | None = None, save_fig_path: str | None = None, **kwargs) None[source]#

Dispatcher to plot parameter regions of different dimensionality.

lf2i.plot.parameter_regions.plot_parameter_region_1D(parameter_region: ndarray, true_parameter: ndarray, parameter_space_bounds: Dict[str, float] | None = None, figsize: Tuple[int, int] | None = None, color: str | None = 'green') None[source]#

Plot 1-dimensional parameter regions using the lower and upper bounds.

lf2i.plot.parameter_regions.plot_parameter_region_2D(parameter_region: ndarray, true_parameter: ndarray | None = None, parameter_space_bounds: Dict[str, Dict[str, float]] | None = None, labels: Sequence[str] | None = None, param_names: Sequence[str] | None = None, figsize: Tuple[int, int] | None = None, alpha_shape: bool = False, alpha: float | None = None, scatter: bool = True, color: str | None = 'green', region_name: str | None = 'Parameter region', custom_ax: Axes | None = None) None[source]#

Plot 2-dimensional parameter regions as point clouds.

lf2i.plot.parameter_regions.parameter_regions_pairplot(*parameter_regions: ndarray, true_parameter: ndarray, parameter_space_bounds: Dict[str, Dict[str, float]] | None = None, labels: ndarray | None = None, param_names: ndarray | None = None, colors: Sequence[str] | None = None, region_names: Sequence[str] | None = None, alpha_shape: bool = False, alpha: float | None = None, scatter: bool = True, figsize: Sequence[int] | None = (15, 15), save_fig_path: str | None = None) None[source]#

Module contents#