Skip to main content

ECDFPlotExplorer

Explorer
DashAI.back.exploration.explorers.ECDFPlotExplorer

Explorer that creates an Empirical Cumulative Distribution Function (ECDF) plot.

The ECDF is a non-parametric, step-function estimate of the cumulative distribution of a numeric variable. For each unique observed value x, the y-coordinate gives the proportion (or count, depending on normalisation) of data points that are less than or equal to x. Because it uses the actual data without binning, the ECDF preserves every observation and does not require a choice of bandwidth or bin width.

The plot reveals the full shape of a distribution: a steep rise in a region indicates many observations concentrated there, while a flat segment indicates few observations. Comparing ECDFs for two groups on the same axes immediately shows differences in median, spread, and tail behaviour.

Use this explorer when you need a precise, assumption-free view of a distribution, or to compare distributions across subgroups without the distortion that binning can introduce in histograms.

Parameters

color_column, default=None
Column used to color the ECDF plot.
facet_col, default=None
Column used to facet the ECDF plot by columns.
facet_row, default=None
Column used to facet the ECDF plot by rows.
ecdf_norm : string, default=probability
Type of normalization used for the ECDF plot.

Methods

get_results(self, exploration_path: str, options: Dict[str, Any]) -> Dict[str, Any]

Defined on ECDFPlotExplorer

Load and return the saved ECDF plot for the frontend.

Parameters

exploration_path : str
Path to the JSON file saved by save_notebook.
options : Dict[str, Any]
Rendering options from the frontend (unused).

Returns

Dict[str, Any]
Dictionary with keys "data" (JSON-serialized Plotly figure), "type" ("plotly_json"), and "config" (empty dict).

launch_exploration(self, dataset: 'DashAIDataset', explorer_info: DashAI.back.dependencies.database.models.Explorer)

Defined on ECDFPlotExplorer

Generate a Plotly empirical cumulative distribution function (ECDF) plot.

Parameters

dataset : DashAIDataset
Dataset containing the selected numeric columns and any grouping or faceting columns.
explorer_info : Explorer
Explorer record with column names and optional display name.

Returns

plotly.graph_objects.Figure
An interactive ECDF figure.

prepare_dataset(self, loaded_dataset: 'DashAIDataset', columns: List[Dict[str, Any]]) -> 'DashAIDataset'

Defined on ECDFPlotExplorer

Extend the column list to include color and facet grouping columns.

Parameters

loaded_dataset : DashAIDataset
The full dataset being explored.
columns : List[Dict[str, Any]]
List of column descriptors already selected by the user.

Returns

DashAIDataset
Dataset slice containing all required columns, as returned by the parent prepare_dataset implementation.

save_notebook(self, notebook_info: DashAI.back.dependencies.database.models.Notebook, explorer_info: DashAI.back.dependencies.database.models.Explorer, save_path: 'Path', result: Any) -> str

Defined on ECDFPlotExplorer

Save the ECDF figure to a JSON file on disk.

Parameters

notebook_info : Notebook
The notebook database record (unused).
explorer_info : Explorer
The explorer record used for filename generation.
save_path : Path
Directory where the file will be saved.
result : Any
The Plotly figure returned by launch_exploration.

Returns

str
The path of the saved JSON file as a POSIX string.

get_metadata(cls) -> Dict[str, Any]

Defined on BaseExplorer

Get metadata for the explorer, used by the DashAI frontend.

Returns

Dict[str, Any]
Dictionary containing display name, description, image preview path, category, icon, color, allowed dtypes, restricted dtypes, and input cardinality constraints.

get_schema(cls) -> dict

Defined on ConfigObject

Generates the component related Json Schema.

Returns

dict
Dictionary representing the Json Schema of the component.

validate_and_transform(self, raw_data: dict) -> dict

Defined on ConfigObject

It takes the data given by the user to initialize the model and returns it with all the objects that the model needs to work.

Parameters

raw_data : dict
A dictionary with the data provided by the user to initialize the model.

Returns

dict
A validated dictionary with the necessary objects.

validate_columns(cls, explorer_info: DashAI.back.dependencies.database.models.Explorer, column_spec: Dict[str, Dict[str, str]]) -> bool

Defined on BaseExplorer

Validate that the selected columns satisfy the explorer's constraints.

Parameters

explorer_info : Explorer
The database record for the explorer instance, including the selected columns.
column_spec : Dict[str, Dict[str, str]]
A mapping from column name to a dict with at least a "type" key describing the column's data type.

Returns

bool
True if all column constraints are satisfied, False otherwise.

validate_parameters(cls, params: Dict[str, Any]) -> bool

Defined on BaseExplorer

Validate explorer parameters against the explorer's schema.

Parameters

params : Dict[str, Any]
The configuration parameters to validate.

Returns

BaseExplorerSchema
The validated and parsed schema instance. Subclasses that override this method may return a bool to indicate pass/fail without returning the model instance.