prevision_quantum_nn.postprocessing.plotter.phase_space_plotter_2d

phase space plotter 2D module

Module Contents

Classes

PhaseSpacePlotter2D

Class PhaseSpacePlotter2D.

class prevision_quantum_nn.postprocessing.plotter.phase_space_plotter_2d.PhaseSpacePlotter2D(plotting_params)

Bases: prevision_quantum_nn.postprocessing.plotter.phase_space_plotter.PhaseSpacePlotter

Class PhaseSpacePlotter2D.

Plotter for a phase space of dimension 2

x_val

validation features to be plotted with the phase space

Type

numpy array

y_val

validation labels to be plotted with the phase space

Type

numpy array

x_plot

array of features to map the phase space

Type

numpy array

has_validation

tells if validation is set to on or not

Type

bool

set_validation_data(self, features, labels)

Sets validation data.

Parameters
  • features (numpy array) – validation features to be plotted with the phase space

  • labels (numpy array) – validation labels to be plotted with the phase space

Raises

ValueError if dimensions do not match 2

prepare_phase_space(self)

Prepare phase space of PhaseSpacePlotter2D.

Checks consistency of min and max creates xxp, yyp for drawing and x_plot for predicting

plot(self, model)
Plot the phase space of a model predictions

in 2D at current_iteration.

Parameters
  • model (QuantumNeuralNetwork) – model to be used to plot phase space

  • cuttent_iteration (int) – iteration at which the model is

  • force_plot (bool) – if current iteration does not match verbose_period, you can also force the plot with this option set to True