ParaMonte MATLAB 3.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
readChainMarkov.m
Go to the documentation of this file.
1%> \brief
2%> Return a list of objects of class [pm.sampling.FileContentsChainDRAM](@ref FileContentsChainDRAM)
3%> containing the content(s) of the ParaMonte simulation output chain file(s) whose path(s)
4%> match the specified input ``pattern`` or the simulation specification
5%> [sampler.spec.outputFileName](\pmdoc_usage_sampling/paradram/specifications/#outputfilename).<br>
6%>
7%> \param[in] self : The input/output parent object of class [pm.sampling.Paradram](@ref Paradram)
8%> which is **implicitly** passed to this dynamic method (not by the user).<br>
9%> \param[in] pattern : See the documentation of the corresponding argument of
10%> the constructor of the method [pm.sampling.Sampler.readChain](@ref Sampler::readChain).<br>
11%> (**optional**, The default is set by [pm.sampling.Sampler.readChain](@ref Sampler::readChain))
12%> \param[in] sep : See the documentation of the corresponding argument of
13%> the constructor of the method [pm.sampling.Sampler.readChain](@ref Sampler::readChain).<br>
14%> (**optional**, The default is set by [pm.sampling.Sampler.readChain](@ref Sampler::readChain))
15%>
16%> \return
17%> ``chainMarkovList`` : The output cell array of objects of class
18%> [pm.sampling.FileContentsChainDRAM](@ref FileContentsChainDRAM),
19%> each of which corresponds to the contents of a unique chain file.<br>
20%> Try ``doc pm.sampling.FileContentsChainDRAM`` to see the documentation
21%> of the contents of the objects of the output list.<br>
22%>
23%> \interface{Paradram}
24%> \code{.m}
25%>
26%> sampler = pm.sampling.Paradram();
27%> chainMarkovList = sampler.readChainMarkov();
28%> chainMarkovList = sampler.readChainMarkov([]);
29%> chainMarkovList = sampler.readChainMarkov(file);
30%> chainMarkovList = sampler.readChainMarkov([], []);
31%> chainMarkovList = sampler.readChainMarkov(file, []);
32%> chainMarkovList = sampler.readChainMarkov(file, sep);
33%>
34%> \endcode
35%>
36%> \warning
37%> Avoid using this routine for very large compact chains.<br>
38%> Reading the full Markov chain of large-scale simulation problems
39%> can be extremely memory-intensive without any potential benefits.<br>
40%>
41%> \warning
42%> This method is to be only used for post-processing of the output
43%> chain file(s) of an already finished simulation. It is NOT meant to
44%> be called by all processes in parallel mode, although it is possible.<br>
45%>
46%> \note
47%> This routine is identical to [pm.sampling.Sampler.readChain](@ref Sampler::readChain)
48%> method, except for the fact that upon reading the output chain files, it will also
49%> convert the chain contents from the default efficient compact format stored
50%> in the file to the full verbose Markov chain format.<br>
51%>
52%> \example{readChainMarkov}
53%> \include{lineno} example/sampling/Paradram/readChainMarkov/main.m
54%> \include{lineno} example/sampling/Paradram/readChainMarkov/main.out.m
55%> \vis{readChainMarkov}
56%> \image html example/sampling/Paradram/readChainMarkov/readChainMarkov.domain.png width=700
57%> <br><br>
58%> \image html example/sampling/Paradram/readChainMarkov/readChainMarkov.traceplot.png width=700
59%> <br><br>
60%> \image html example/sampling/Paradram/readChainMarkov/readChainMarkov.proposalAdaptation.png width=700
61%>
62%> \final{readChainMarkov}
63%>
64%> \author
65%> \JoshuaOsborne, May 21 2024, 12:06 AM, University of Texas at Arlington<br>
66%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute for Computational Engineering and Sciences (ICES), UT Austin<br>
67function chainMarkovList = readChainMarkov(self, pattern, sep)
68
69 if nargin < 3
70 sep = [];
71 end
72
73 if nargin < 2
74 pattern = [];
75 end
76
77 chainMarkovList = self.readChain(pattern, sep, "verbose");
78
79end
function list()
Return a list of MATLAB strings containing the names of OS platforms supported by the ParaMonte MATLA...
This is the base class for generating objects that contain the contents of a chain file generated by ...
This is the ParaDRAM class for generating instances of serial and parallel Delayed-Rejection Adaptive...
Definition: Paradram.m:18
function Paradram()
Generate and return an instance of the serial and parallel Delayed-Rejection Adaptive Metropolis-Hast...
function readChain(in self, in pattern, in sep, in varargin)
Return a list of objects of superclass pm.sampling.FileContentsChain containing the content(s) of the...
function parallel()
Return a scalar MATLAB logical that is true if and only if the current installation of MATLAB contain...
function verbose(in cmat, in dim, in weight)
Return a MATLAB double, cell, or table matrix whose rows or columns are unrolled according to a presp...
function which(in vendor)
Return the a MATLAB string containing the path to the first mpiexec executable binary found in system...