Module Expr Str ImportFrom alias Import alias identifier ImportFrom alias ImportFrom alias Assign TupleStore NameStore NameStore Call NameLoad keyword Num keyword Num keyword Num Assign NameStore Call NameLoad keyword Str keyword Num Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword Num keyword Num keyword Num keyword TupleLoad Str Dict Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call NameLoad NameLoad keyword NameLoad
N/A N/A 
=========================================
Efficient exact learning of 1-slack SSVMs
=========================================

This example illustrates the role of approximate inference and caching
in exact learning of a 1-slack SSVM.

Please see plot_objetive_curve.py for an interpretation of the curves.

We start learning by using an undergenerating inference method,
QPBO-based alpha expansion. One the algorithm can not find a violated
constraint any more, we switch to a less efficient but exact inference
procedure, branch-and-bound based on AD3.
The switch to AD3 can be seen in the graph after the (approximate)
primal objective and the cutting plane lower bound touch. (zoom in)

After the switch to exact inference, the red circles show the true
primal objective.
 pystruct.models DirectionalGridCRF N/A pystruct.learners ssvm pystruct.datasets generate_blocks_multinomial pystruct.plot_learning plot_learning N/A N/A X Y N/A generate_blocks_multinomial noise 2 n_samples 20 seed 1 N/A crf N/A DirectionalGridCRF inference_method qpbo neighborhood 4 N/A clf N/A N/A ssvm OneSlackSSVM model crf n_jobs -1 inference_cache 100 show_loss_every 10 switch_to N/A ad3 N/A branch_and_bound True N/A N/A N/A clf fit X Y N/A N/A plot_learning clf time False