pystruct.plot_learning.plot_learning

pystruct.plot_learning.plot_learning(ssvm, time=True)[source]

Plot optimization curves and cache hits.

Create a plot summarizing the optimization / learning process of an SSVM. It plots the primal and cutting plane objective (if applicable) and also the target loss on the training set against training time. For one-slack SSVMs with constraint caching, cached constraints are also contrasted against inference runs.

Parameters:

ssvm : object

SSVM learner to evaluate. Should work with all learners.

time : boolean, default=True

Whether to use wall clock time instead of iterations as the x-axis.

Notes

Warm-starting a model might mess up the alignment of the curves. So if you warm-started a model, please don’t count on proper alignment of time, cache hits and objective.