arsenal.viz package

Submodules

arsenal.viz.learning_curve module

class arsenal.viz.learning_curve.LearningCurve(name, sty=None, legend=True, ax=None)[source]

Bases: object

Plot learning curve as data arrives.

add_widget()[source]
bands(type)[source]
draw()[source]
draw_bands(xs, ys, c)[source]
draw_extra(ax)[source]
draw_smoothing(xs, ys, c)[source]
loglog()[source]
semilogx()[source]
semilogy()[source]
should_update()[source]

Returns true if its been long enough (>= min_time) since the last_update.

smooth(type, aggregate, **kwargs)[source]
smoothed_signal(xs, ys)[source]
update(iteration, **kwargs)[source]

Update plots, if iteration is None we’ll use iteration=len(data)

arsenal.viz.mds module

arsenal.viz.mds.mds(X, dimensions=2)[source]

Multidimensional Scaling - Given a matrix of interpoint distances, find a set of low dimensional points that have similar interpoint distances.

Author: Jeremy M. Stober with modifications by Tim Vieira

arsenal.viz.mds.mds_plot2D(points, distance)[source]
arsenal.viz.mds.mds_plot3D(points, distance)[source]
arsenal.viz.mds.mds_scatter(distance)[source]

arsenal.viz.report module

class arsenal.viz.report.Measurements(colors)[source]

Bases: object

clear()[source]
show(ax=None)[source]

arsenal.viz.util module

class arsenal.viz.util.NumericalDebug(name)[source]

Bases: object

Incrementally builds a DataFrame, includes plotting and comparison method.

The quickest way to use it is

>>> from arsenal.viz import DEBUG
>>> d = DEBUG['test1']
>>> d.update(want=1, have=1)
>>> d.update(want=1, have=1.01)
>>> d.update(want=1, have=0.99)
   want  have
0     1  1.00
1     1  1.01
2     1  0.99

To plots and runs numerical comparison tests,

>>> d.compare()     # doctest: +SKIP
compare(want='want', have='have', show_regression=1, scatter=1, **kw)[source]
df

lazily make DataFrame from _data.

update(**kw)[source]

Pass in column values for the row by name as keyword arguments.

arsenal.viz.util.axman(name, xlabel=None, ylabel=None, title=None, clear=True)[source]

axman is axis manager. Manages clearing, updating and maintaining a global handle to a named plot.

arsenal.viz.util.contour(f, xdomain, ydomain, color='viridis', alpha=0.5, levels=None, ax=None)

Contour plot of a function of two variables.

arsenal.viz.util.contour_plot(f, xdomain, ydomain, color='viridis', alpha=0.5, levels=None, ax=None)[source]

Contour plot of a function of two variables.

arsenal.viz.util.lineplot(name, with_ax=False, halflife=20, xlabel=None, ylabel=None, title=None, **style)[source]
arsenal.viz.util.name2color(palette=['r', 'g', 'b', 'y', 'c', 'm', 'k'])[source]

Create a mapping from names to matplotlib colors.

arsenal.viz.util.newax()[source]
arsenal.viz.util.plot3d(f, xdomain, ydomain, ax=None)[source]

3d surface plot of a function of two variables.

class arsenal.viz.util.plot_xsection(f, a, b, n, ax=None, opts=None)[source]

Bases: object

curve()[source]

Sweep a curve in parameter spaces which is convex combination of a and b.

arsenal.viz.util.save_plots(pdf)[source]

save all plots to pdf

arsenal.viz.util.scatter_manager(name, with_ax=False, xlabel=None, ylabel=None, title=None, **style)[source]
arsenal.viz.util.test()[source]
arsenal.viz.util.update_ax(ax, clear=True)[source]

Manages clearing and updating a plot.

Module contents