plot_stream_training_data#
- skactiveml.visualization.plot_stream_training_data(ax, X, y, queried_indices, classes, feature_bound, unlabeled_color='grey', cmap='coolwarm', alpha=0.2, linewidth=3, plot_cand_highlight=True)[source]#
Plot the samples of a data stream over time, colored by their labels.
- Parameters:
- axmatplotlib.axes.Axes
The axis on which the samples are plotted.
- Xarray-like of shape (n_samples, 1)
Training data set, usually complete, i.e., including the labeled and unlabeled samples.
- yarray-like of shape (n_samples,)
Labels of the training data set.
- queried_indicesarray-like of shape (n_samples,)
Indicates which samples in X have been queried.
- classesarray-like of shape (n_classes,)
Holds the label for each class.
- feature_boundarray-like of shape [[t_min, t_max], [x_min, x_max]]
Time and feature ranges of the plot. Only t_max is used, as the end of the current candidate’s highlight.
- unlabeled_colorstr or matplotlib.colors.Colormap, default=’grey’
The color for the unlabeled samples.
- cmapstr or matplotlib.colors.Colormap, default=’coolwarm’
The colormap for the class labels.
- alphascalar, default=0.2
Set the alpha value used for blending - not supported on all backends.
- linewidthfloat, default=3
Set the line width in points.
- plot_cand_highlightbool, default=True
The indicator to highlight the current candidate.
- Returns:
- data_lineslist of matplotlib.lines.Line2D
The lines added to ax.
Examples using skactiveml.visualization.plot_stream_training_data#
Cognitive Dual-Query Strategy with Fixed-Uncertainty
Cognitive Dual-Query Strategy with Random Sampling
Cognitive Dual-Query Strategy with Randomized-Variable-Uncertainty
Cognitive Dual-Query Strategy with Variable-Uncertainty