ParaMonte MATLAB 3.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
SubplotEllipse Class Reference

This is the SubplotEllipse class for generating instances of 2-dimensional Ellipse Subplot visualizations based on the relevant MATLAB intrinsic functions.
More...

Inheritance diagram for SubplotEllipse:
Collaboration diagram for SubplotEllipse:

Public Member Functions

function SubplotEllipse (in gramian, in center, in cval, in varargin)
 Construct and return an object of class pm.vis.SubplotEllipse.
More...
 
function make (in self, in varargin)
 Generate a plot from the selected dimensions of the input ellipsoid data to the object constructor.
More...
 

Detailed Description

This is the SubplotEllipse class for generating instances of 2-dimensional Ellipse Subplot visualizations based on the relevant MATLAB intrinsic functions.

Note
See the documentation of the constructor of the class pm.vis.SubplotEllipse for example usage.
See the documentation of the attributes of the superclass pm.vis.SubplotEllipse3.
See also
pm.vis.Cascade
pm.vis.Subplot
pm.vis.Triplex
pm.vis.Figure
pm.vis.Plot
pm.vis.Tile


Final Remarks


If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.

  1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
  2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Author:
Joshua Alexander Osborne, May 21 2024, 6:05 PM, University of Texas at Arlington
Fatemeh Bagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.
Amir Shahmoradi, May 16 2016, 9:03 AM, Oden Institute for Computational Engineering and Sciences (ICES), UT Austin

Definition at line 28 of file SubplotEllipse.m.

Constructor & Destructor Documentation

◆ SubplotEllipse()

function SubplotEllipse::SubplotEllipse ( in  gramian,
in  center,
in  cval,
in  varargin 
)

Construct and return an object of class pm.vis.SubplotEllipse.

In the following documentation,

  1. The variable ndim represents the number of ellipsoids in the input data.
    The value of ndim is inferred from the shapes of the input gramian and center arguments as max([2, size(gramian, 1), size(center, 1)]).

  2. The variable nell represents the number of ellipsoids in the input data.
    The value of nell is inferred from the shapes of the input gramian, center, and cval arguments as max([size(gramian, 3), size(center, 2), size(cval, 2)]).
    If the above expression yields zero, then nell is set to 75.

  3. The variable npnt represents the number of points used in visualizing each ellipsoid.
    The value of npnt is inferred from the shapes of the input argument cval as size(cval, 1).
    If the above expression yields zero or one, then npnt is set to 100.

Note
This class is merely a simple extension of the superclass pm.vis.SubplotEllipse3.
The only difference is that all zval values for all points of all coordinates are set to default values.
The only tangible action this class performs is to adjust the camera view to a 2D axis.
Parameters
[in]gramian: See the corresponding input argument to the constructor of the parent object.
[in]center: See the corresponding input argument to the constructor of the parent object.
[in]cval: See the corresponding input argument to the constructor of the parent object.
[in]varargin: Any property, value pair of the object.
If the property is a struct(), then its value must be given as a cell array, with consecutive elements representing the struct property-name, property-value pairs.
Note that all of these property-value pairs can be also directly set via the parent object attributes, before calling the make() method.
Returns
self : The output object of class pm.vis.SubplotEllipse.


Possible calling interfaces

s = pm.vis.SubplotEllipse();
s = pm.vis.SubplotEllipse(gramian);
s = pm.vis.SubplotEllipse(gramian, center);
s = pm.vis.SubplotEllipse(gramian, center, cval);
s = pm.vis.SubplotEllipse(gramian, center, cval, varargin);
Note
See also the documentation of the attributes of the superclass pm.vis.SubplotEllipse3.


Example usage

1cd(fileparts(mfilename('fullpath'))); % Change working directory to source code directory.
2addpath('../../../'); % Add the ParaMonte library root directory to the search path.
3
4sampler = pm.sampling.Paradram();
5sampler.spec.outputStatus = "retry";
6sampler.spec.outputFileName = "mvn";
7sampler.spec.randomSeed = 28457353; % make sampling reproducible.
8sampler.spec.outputChainSize = 30000; % Use a small chain size for illustration.
9sampler.spec.outputRestartFileFormat = "ascii";
10sampler.silent = true;
11sampler.run ( @(x) -sum((x - [-5; 5; 10; -10]) .^ 2) ...
12 , 4 ...
13 );
14
15restart = sampler.readRestart();
16restart = restart{1};
17
18figure("color", "white");
19sv = pm.vis.SubplotEllipse(restart.proposalCov, restart.proposalMean, transpose(restart.uniqueStateVisitCount));
20sv.make("axes", {"zscale", "log"}, "dimx", [1, 3], "dimy", [1, 3] + 1);
21pm.vis.figure.savefig("SubplotEllipse.1.png", "-m3");
22
23close all;
function make(in self, in varargin)
Generate a plot from the selected dimensions of the input ellipsoid data to the object constructor.
function root()
Return a scalar MATLAB string containing the root directory of the ParaMonte library package.

Visualization of the example output


Final Remarks


If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.

  1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
  2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Author:
Joshua Alexander Osborne, May 21 2024, 10:21 AM, University of Texas at Arlington
Fatemeh Bagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.
Amir Shahmoradi, May 16 2016, 9:03 AM, Oden Institute for Computational Engineering and Sciences (ICES), UT Austin

Member Function Documentation

◆ make()

function SubplotEllipse::make ( in  self,
in  varargin 
)

Generate a plot from the selected dimensions of the input ellipsoid data to the object constructor.

Parameters
[in,out]self: The input/output parent object of class pm.vis.SubplotEllipse which is implicitly passed to this dynamic method (not by the user).
[in]varargin: Any property, value pair of the parent object.
If the property is a struct(), then its value must be given as a cell array, with consecutive elements representing the struct property-name, property-value pairs.
Note that all of these property-value pairs can be also directly set via the parent object attributes, before calling the make() method.


Possible calling interfaces

pm.vis.SubplotEllipse.make(varargin);


Example usage

1cd(fileparts(mfilename('fullpath'))); % Change working directory to source code directory.
2addpath('../../../'); % Add the ParaMonte library root directory to the search path.
3
4sampler = pm.sampling.Paradram();
5sampler.spec.outputStatus = "retry";
6sampler.spec.outputFileName = "mvn";
7sampler.spec.randomSeed = 28457353; % make sampling reproducible.
8sampler.spec.outputChainSize = 30000; % Use a small chain size for illustration.
9sampler.spec.outputRestartFileFormat = "ascii";
10sampler.silent = true;
11sampler.run ( @(x) -sum((x - [-5; 5; 10; -10]) .^ 2) ...
12 , 4 ...
13 );
14
15restart = sampler.readRestart();
16restart = restart{1};
17
18figure("color", "white");
19sv = pm.vis.SubplotEllipse(restart.proposalCov, restart.proposalMean, transpose(restart.uniqueStateVisitCount));
20sv.make("axes", {"zscale", "log"}, "dimx", [1, 3], "dimy", [1, 3] + 1);
21pm.vis.figure.savefig("SubplotEllipse.1.png", "-m3");
22
23close all;

Visualization of the example output


Final Remarks


If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.

  1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
  2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Note
This method is pure, except for the changes in fout component.
Author:
Joshua Alexander Osborne, May 21 2024, 10:23 AM, University of Texas at Arlington
Fatemeh Bagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.
Amir Shahmoradi, May 16 2016, 9:03 AM, Oden Institute for Computational Engineering and Sciences (ICES), UT Austin

The documentation for this class was generated from the following file: