plenoptic.plot.mad_loss_all#
- plenoptic.plot.mad_loss_all(mad_metric1_min, mad_metric2_min, mad_metric1_max, mad_metric2_max, metric1_name=None, metric2_name=None, metric1_kwargs={'c': 'C0'}, metric2_kwargs={'c': 'C1'}, min_kwargs={'linestyle': '--'}, max_kwargs={'linestyle': '-'}, figsize=(10, 5))[source]#
Plot loss for full set of MAD Competiton instances.
To generate a full set of MAD Competition images, you need four instances: one for minimizing and maximizing each metric. This helper function creates a two-axis figure to display the loss for this full set.
- Parameters:
mad_metric1_min (
MADCompetition) –MADCompetitionobject that minimized the first metric.mad_metric2_min (
MADCompetition) –MADCompetitionobject that minimized the second metric.mad_metric1_max (
MADCompetition) –MADCompetitionobject that maximized the first metric.mad_metric2_max (
MADCompetition) –MADCompetitionobject that maximized the second metric.metric1_name (
str|None(default:None)) – Name of the first metric. IfNone, we use the name of theoptimized_metricfunction frommad_metric1_min.metric2_name (
str|None(default:None)) – Name of the second metric. IfNone, we use the name of theoptimized_metricfunction frommad_metric2_min.metric1_kwargs (
dict(default:{'c': 'C0'})) – Dictionary of arguments to pass tomatplotlib.pyplot.plotto identify synthesis instance where the first metric was being optimized.metric2_kwargs (
dict(default:{'c': 'C1'})) – Dictionary of arguments to pass tomatplotlib.pyplot.plotto identify synthesis instance where the second metric was being optimized.min_kwargs (
dict(default:{'linestyle': '--'})) – Dictionary of arguments to pass tomatplotlib.pyplot.plotto identify synthesis instance whereoptimized_metricwas being minimized.max_kwargs (
dict(default:{'linestyle': '-'})) – Dictionary of arguments to pass tomatplotlib.pyplot.plotto identify synthesis instance whereoptimized_metricwas being maximized.figsize (
tuple[int,int] (default:(10, 5))) – Size of the figure we create.
- Return type:
- Returns:
fig – Figure containing the plot.
- Raises:
ValueError – If the four
MADCompetitioninstances do not have the sameimageattribute.
See also
synthesis_lossDisplay the loss from a single
MADCompetitioninstance.synthesis_statusCreate a composite plot showing synthesis status of a single
MADCompetitioninstance.
Examples
See the MAD Competition tutorial notebooks in the User Guide of documentation for examples.