# plot_confidence_ellipses¶

qctrlvisualizer.plot_confidence_ellipses(ellipse_matrix: np.ndarray, estimated_parameters: np.ndarray, actual_parameters: Optional[np.ndarray] = None, parameter_names: Optional[list[str]] = None, parameter_units: str | list[str] = 'Hz', *, figure: Optional[matplotlib.figure.Figure] = None)

Create an array of confidence ellipse plots.

From an (N,N) matrix transformation and N estimated parameters, plots the confidence ellipse for each pair of parameters.

Parameters
• ellipse_matrix (np.ndarray) – The square matrix which transforms a unit hypersphere in an N-dimensional space into a hyperellipse representing the confidence region. Must be of shape (N, N), with N > 1.

• estimated_parameters (np.ndarray) – The values of the estimated parameters. Must be of shape (N,).

• actual_parameters (np.ndarray, optional) – The actual values of the estimated parameters. If you provide these, they’re plotted alongside the ellipses and estimated parameters. Must be of shape (N,).

• parameter_names (list[str], optional) – The name of each parameter, to be used as axes labels. If provided, it must be of length N. If not provided, the axes are labelled “Parameter 0”, “Parameter 1”, …

• parameter_units (str or list[str], optional) – The units of each parameter. You can provide a list of strings with the units of each parameter, or a single string if all parameters have the same units. Defaults to “Hz”.

• figure (matplotlib.figure.Figure, optional) – A matplotlib Figure in which to place the plots. If passed, its dimensions and axes will be overridden.