RegularizationSchedule
phasic.svgd.RegularizationSchedule()Base class for regularization schedules.
Subclasses should implement call(iteration, particles) returning a scalar regularization value.
Methods
| Name | Description |
|---|---|
| plot | Plot the regularization schedule over iterations. |
plot
phasic.svgd.RegularizationSchedule.plot(
nr_iter,
figsize=None,
title=None,
ax=None,
return_ax=False,
)Plot the regularization schedule over iterations.
Parameters
nr_iter :int-
Number of iterations to plot
figsize :tuple= (4, 3)-
Figure size (width, height) in inches
title :str= None-
Plot title. If None, uses class name
ax :matplotlib.axes.Axes= None-
Axes to plot on. If None, creates new figure
return_ax :bool= False-
If True, return the axes object. If False, call plt.show() instead.
Returns
ax :matplotlib.axes.Axesor None-
Axes object if return_ax=False, otherwise None
Examples
>>> schedule = ExpRegularization(first_reg=5.0, last_reg=0.1, tau=500.0)
>>> ax = schedule.plot(nr_iter=2000)
>>> plt.show()