pymoto.PlotIter

class pymoto.PlotIter(ylim=None, log_scale=False, **kwargs)

Plot iteration history of one or more variables

Input Signals:
  • *args (Numeric or numpy.ndarray): Y-values to show for each iteration

Keyword Arguments:
  • saveto (str) – Save images of each iteration to the specified location. (default = None)

  • overwrite (bool) – Overwrite saved image every time the figure is updated, else prefix _0000 is added to the filename (default = False)

  • show (bool) – Show the figure on the screen

  • ylim – Provide y-axis limits for the plot

__init__(ylim=None, log_scale=False, **kwargs)

Initialize iteration plot module

Parameters:
  • ylim ([float, float], optional) – Provide y-axis limits for the plot. Defaults to automatic scaling.

  • log_scale (bool, optional) – Use logarithmic scale for the y-axis. Defaults to False.

  • **kwargs – Additional keyword arguments for pymoto.FigModule

Methods

__init__([ylim, log_scale])

Initialize iteration plot module

connect(sig_in[, sig_out])

Connect without automatic adding to a function network

get_input_sensitivities([as_list])

get_input_states([as_list])

get_output_sensitivities([as_list])

get_output_states([as_list])

reset()

Reset the state of the sensitivities (they are set to zero or to None)

response()

Calculate the response from sig_in and output this to sig_out

sensitivity()

Calculate sensitivities using backpropagation

Attributes

n_in

Get the number of input signals

n_out

Get the number of output signals

sig_in

sig_out

connect(sig_in: Signal | Iterable[Signal], sig_out: Signal | Iterable[Signal] = None)

Connect without automatic adding to a function network

get_input_sensitivities(as_list=False)
get_input_states(as_list=False)
get_output_sensitivities(as_list=False)
get_output_states(as_list=False)
property n_in: int

Get the number of input signals

property n_out: int

Get the number of output signals

Note: Cannot be used in the initial __call__()

reset()

Reset the state of the sensitivities (they are set to zero or to None)

response()

Calculate the response from sig_in and output this to sig_out

sensitivity()

Calculate sensitivities using backpropagation

Based on the sensitivity we get from sig_out, reverse the process and output the new sensitivities to sig_in

sig_in: List = None
sig_out: List = None