Visualization
plot_correlation_analysis(dataset, corr_threshold=0, features=None, ax=None, **kwargs)
Plot the correlated features in a dataset
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
dataset | 
AbstractPDMDataset
 | 
 The dataset  | 
required | 
corr_threshold | 
float
 | 
 Minimum threshold to consider that the correlation is high  | 
0
 | 
features | 
Optional[List[str]]
 | 
 List of features  | 
None
 | 
ax | 
Optional[Axes]
 | 
 The axis where to draw  | 
None
 | 
Returns:
| Type | Description | 
|---|---|
Axes
 | 
 The plot axis  | 
Source code in ceruleo/graphics/analysis.py
durations_boxplot(datasets, xlabel, ylabel='Cycle Duration', ax=None, hlines=[], units='m', transform=lambda x: x, maxy=None, **kwargs)
Generate boxplots of the lives duration
Example:
ax = durations_boxplot(
    [train_dataset, validation_dataset],
    xlabel=['Train', 'Validation'],
    ylabel='Unit Cycles',
    figsize=(17, 5))
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
datasets | 
Union[AbstractPDMDataset, List[AbstractPDMDataset]]
 | 
 Dataset from which take the lives durations  | 
required | 
xlabel | 
Union[str, List[str]]
 | 
 Label of each dataset to use as label in the boxplot  | 
required | 
ylabel | 
str
 | 
 Label of the y axis  | 
'Cycle Duration'
 | 
ax | 
Optional[Axes]
 | 
 Axis where to draw the plot.If missing a new figure will be created  | 
None
 | 
hlines | 
List[Tuple[float, str]]
 | 
 Horizontal lines to add to the figure in the form [(y_coordinate, label)]  | 
[]
 | 
units | 
str
 | 
 Units of time of the lives. Useful to generate labels  | 
'm'
 | 
transform | 
Callable[[float], float]
 | 
 A function to transform each duration  | 
lambda x: x
 | 
maxy | 
Optional[float]
 | 
 Maximum y value of the plot  | 
None
 | 
Returns:
| Type | Description | 
|---|---|
Axes
 | 
 Axis where plot has been drawn  | 
Source code in ceruleo/graphics/duration.py
durations_histogram(datasets, *, label, xlabel='Cycle Duration', bins=15, units='m', vlines=[], ax=None, add_mean=True, add_median=True, transform=lambda x: x, threshold=np.inf, color=None, **kwargs)
Generate an histogram from the lives durations of the dataset
Example: ''' durations_histogram( [train_dataset,validation_dataset], label=['Train','Validation'], xlabel='Unit Cycles', units='cycles', figsize=(17, 5)); '''
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
datasets | 
Union[AbstractPDMDataset, List[AbstractPDMDataset]]
 | 
 Dataset from which take the lives durations  | 
required | 
xlabel | 
str
 | 
 Label of the x axis, by default Cycle Duration  | 
'Cycle Duration'
 | 
label | 
Union[str, List[str]]
 | 
 Label of each dataset to use as label in the boxplot, by default 1  | 
required | 
bins | 
int
 | 
 Number of bins to compute in the histogram, by default 15  | 
15
 | 
units | 
str
 | 
 Units of time of the lives. Useful to generate labels, by default m  | 
'm'
 | 
vlines | 
List[Tuple[float, str]]
 | 
 Vertical lines to add to the figure in the form [(x_coordinate, label)]  | 
[]
 | 
ax | 
Optional[Axes]
 | 
 Axis where to draw the plot. If missing a new figure will be created  | 
None
 | 
add_mean | 
bool
 | 
 Whether to add a vertical line with the mean value, by default True  | 
True
 | 
add_median | 
bool
 | 
 whether to add a vertical line with the median value, by default True  | 
True
 | 
transform | 
Callable[[float], float]
 | 
 A function to transform each duration, by default identity transform  | 
lambda x: x
 | 
threshold | 
float
 | 
 Includes duration less than the threshold, by default np.inf  | 
inf
 | 
Returns:
| Type | Description | 
|---|---|
Axes
 | 
 The axis in which the histogram was created  |