Helpers for plotting data

breze.learn.display.scatterplot_matrix(X, C=None, symb='o', alpha=1, fig=None)

Return a figure containig a scatter plot matrix.

This is a useful tool for inspecting multi dimensional data. Each dimension will be plotted against each dimension as a scatter plot, arranged into a matrix. The diagonal will contain histograms.

Parameters:

X : array_like

2D array containing the points to plot.

C : array_like

Class labels (optional). Each row of X with the same value in C will be given the same color in the plots.

symb : string

Symbol to use for plotting. Will be forwarded to pylab.plot.

alpha : float

Between 0 and 1. Transparency of the points, where 1 means fully opaque.

fig : matplotlib.pyplot.Figure or None

Figure to plot into. If None, will be created itself.

breze.learn.display.time_series_filter_plot(filters, n_rows=None, n_cols=None, fig=None)

Plot filters for time series data.

Each filter is plotted into its own axis.

Parameters:

filters : array_like

The argument filters is expected to be an array of shape (n_filters, window_size, n_channels). n_filters is the number of filter banks, window_size is the length of a time window and n_channels is the number of different sensors.

n_rows : int, optional, default: None

Number of rows for the plot. If not given, inferred from n_cols to match dimensions. If n_cols is not given as well, both are taken to be roughly the square root of the number of filters.

n_cols : int, optional, default: None

Number of rows for the plot. If not given, inferred from n_rows to match dimensions. If n_rows is not given as well, both are taken to be roughly the square root of the number of filters.

fig : Figure, optional

Figure to plot the axes into. If not given, a new one is created.

Returns:

figure : matplotlib figre

Figure object to save or plot.

The following function was adapted from the scipy cookbook.

breze.learn.display.hinton(ax, W, max_weight=None)

Draws a Hinton diagram for the matrix W to axis ax.