Skip to content

Visualization

visualize_chemspace

visualize_chemspace(X: np.ndarray, y: Optional[Union[List[np.ndarray], np.ndarray]] = None, labels: Optional[List[str]] = None, n_cols: int = 2, fig_base_size: float = 8, w_h_ratio: float = 0.5, dpi: int = 150, seaborn_theme: Optional[str] = 'whitegrid', plot_kwargs: dict = None, umap_kwargs: dict = None)

Plot the coverage in chemical space. Also, color based on the target values.

Parameters:

Name Type Description Default
X ndarray

Array the molecular features.

required
y Optional[Union[List[ndarray], ndarray]]

A list of arrays with the target values.

None
labels Optional[List[str]]

Optional list of labels for each set of features.

None
n_cols int

Number of columns in the subplots.

2
fig_base_size float

Base size of the plots.

8
w_h_ratio float

Width/height ratio.

0.5
dpi int

DPI value of the figure.

150
seaborn_theme Optional[str]

Seaborn theme.

'whitegrid'
plot_kwargs dict

seaborn plot arguments.

None
umap_kwargs dict

Keyword arguments for the UMAP algorithm.

None

visualize_continuous_distribution

visualize_continuous_distribution(data: np.ndarray, log_scale: bool = False, bins: Optional[Sequence[float]] = None)

KDE plot the distribution of the column in data with colored sections under the KDE curve.

Parameters:

Name Type Description Default
data ndarray

A 1D numpy array with the values to plot the distribution for.

required
log_scale bool

Whether to plot the x-axis in log scale.

False
bins Optional[Sequence[float]]

The bin boundaries to color the area under the KDE curve.

None

visualize_distribution_with_outliers

visualize_distribution_with_outliers(values: np.ndarray, is_outlier: Optional[List[bool]] = None, title: str = 'Probability Plot')

Visualize the distribution of the data and highlight the potential outliers.

Parameters:

Name Type Description Default
values ndarray

Values for visulization.

required
is_outlier Optional[List[bool]]

List of outlier flag.

None
title str

Title of plot

'Probability Plot'