convst.interpreters.RDST_Ridge_interpreter¶
- class convst.interpreters.RDST_Ridge_interpreter(RDST_Ridge)¶
Bases:
objectInterpreter for RDST Ridge models.
- Parameters:
- RDST_Ridgeobject
A fitted RDST Ridge classifier.
- Returns:
- None.
Methods
__init__(RDST_Ridge)visualize_best_shapelets_one_class(X, y, ...)Plot the n_shp best candidates for the class_id.
- visualize_best_shapelets_one_class(X, y, class_id, n_shp=1, figsize=(16, 12), seaborn_context='talk')¶
Plot the n_shp best candidates for the class_id. Visualize best macth on two random samples and how the shapelet discriminate (X,y) with boxplots
- Parameters:
- Xarray, shape=(n_samples, n_fetaures, n_timestamps)
A time series dataset. Can be the training set to visualize training results, or testing to visualize generalization to unseen samples.
- yarray, shape=(n_samples)
The true classes of the time series dataset.
- class_idint
ID of the class we want to visualize. The n_shp best shapelet for this class will be selected based on the feature coefficients inside the ridge classifier.
- n_shpint, optional
Number of plots to output, one per shapelet (i.e. the n_shp best shapelets for class_id). The default is 1.
- figsizetuple, optional
Size of the figure. The default is (16,12).
- seaborn_contextstr, optional
Seaborn context. The default is ‘talk’.
- Returns:
- None.