convst.interpreters.RDST_interpreter

class convst.interpreters.RDST_interpreter(RDST)

Bases: object

A class to interpret the result from a fitted RDST instance.

Parameters:
RDSTobject

A fitted RDST transformer.

Returns:
None.

Methods

__init__(RDST)

plot(id_shapelet[, figsize, seaborn_context, ax])

Plot the shapelet values.

plot_distance_vector(id_shapelet, X[, ...])

Plot the shapelet distance vector computed between itself and X.

plot_on_X(id_shapelet, X[, figsize, ...])

Plot the shapelet on its best match on the time series X.

plot(id_shapelet, figsize=(10, 5), seaborn_context='talk', ax=None)

Plot the shapelet values.

Parameters:
id_shapeletint

ID of the shapelet to plot.

figsizetuple, optional

2D size of the figure. The default is (10,5).

seaborn_contextstr, optional

Seaborn module context. The default is ‘talk’.

axmatplotlib axe, optional

A matplotlib axe on which to plot the figure. The default is None and will create a new figure of size figsize.

Returns:
figmatplotlib figure

The resulting figure

plot_distance_vector(id_shapelet, X, figsize=(10, 5), seaborn_context='talk', c_threshold='purple', ax=None, label=None)

Plot the shapelet distance vector computed between itself and X.

Parameters:
id_shapeletint

ID of the shapelet to plot.

Xarray, shape=(n_timestamps) or shape=(n_features, n_timestamps)

Input time series

figsizetuple, optional

Size of the figure. The default is (10,5).

seaborn_contextstr, optional

Seaborn context. The default is ‘talk’.

c_thresholdfloat, optional

Color used to represent a line on the y-axis to visualize the lambda threshold. The default is ‘purple’.

axmatplotlib axe, optional

A matplotlib axe on which to plot the figure. The default is None and will create a new figure of size figsize.

labelstr, optional

Custom label to plot as legend. The default is None.

Returns:
figmatplotlib figure

The resulting figure with the distance vector obtained by d(S,X)

plot_on_X(id_shapelet, X, figsize=(10, 5), seaborn_context='talk', shp_dot_size=40, shp_c='purple', ax=None, label=None)

Plot the shapelet on its best match on the time series X.

Parameters:
id_shapeletint

ID of the shapelet to plot.

Xarray, shape=(n_timestamps) or shape=(n_features, n_timestamps)

Input time series

figsizetuple, optional

Size of the figure. The default is (10,5).

seaborn_contextstr, optional

Seaborn context. The default is ‘talk’.

alphafloat, optional

Alpha parameter for plotting X. The default is 0.9.

shp_dot_sizefloat, optional

Size of the scatter plot to represent the shapelet on X. The default is 40.

shp_cstr, optional

Color of the shapelet scatter plot. The default is ‘purple’.

axmatplotlib axe, optional

A matplotlib axe on which to plot the figure. The default is None and will create a new figure of size figsize.

labelstr, optional

Custom label to plot as legend for X. The default is None.

x_linewidthfloat, optional

The linewidth of X plot. The default is 2.

Returns:
figmatplotlib figure

The resulting figure with S on its best match on X. A normalized shapelet will be scalled to macth the scale of X.