A single Markov chain. More...
#include <shark/Unsupervised/RBM/Sampling/MarkovChain.h>
Public Types | |
typedef Operator::RBM | RBM |
The type of the RBM the operator is working with. More... | |
typedef Batch< detail::MarkovChainSample< HiddenSample, VisibleSample > >::type | SampleBatch |
A batch of samples containing hidden and visible samples as well as the energies. More... | |
typedef SampleBatch::reference | reference |
Mutable reference to an element of the batch. More... | |
typedef SampleBatch::const_reference | const_reference |
Immutable reference to an element of the batch. More... | |
Public Member Functions | |
MarkovChain (RBM *rbm) | |
Constructor. More... | |
void | setBatchSize (std::size_t batchSize) |
Sets the number of parallel samples to be evaluated. More... | |
std::size_t | batchSize () |
void | initializeChain (Data< RealVector > const &dataSet) |
Initializes with data points drawn uniform from the set. More... | |
void | initializeChain (RealMatrix const &sampleData) |
Initializes with data points from a batch of points. More... | |
void | step (unsigned int numberOfSteps) |
Runs the chain for a given number of steps. More... | |
const_reference | sample () const |
Returns the current sample of the Markov chain. More... | |
SampleBatch const & | samples () const |
Returns the current batch of samples of the Markov chain. More... | |
SampleBatch & | samples () |
Returns the current batch of samples of the Markov chain. More... | |
Operator const & | transitionOperator () const |
Returns the transition operator of the Markov chain. More... | |
Operator & | transitionOperator () |
Returns the transition operator of the Markov chain. More... | |
Static Public Attributes | |
static const bool | computesBatch = true |
The MarkovChain can be used to compute several samples at once. More... | |
A single Markov chain.
You can run the Markov chain for some sampling steps by applying a transition operator.
Definition at line 43 of file MarkovChain.h.
typedef SampleBatch::const_reference shark::MarkovChain< Operator >::const_reference |
Immutable reference to an element of the batch.
Definition at line 61 of file MarkovChain.h.
typedef Operator::RBM shark::MarkovChain< Operator >::RBM |
The type of the RBM the operator is working with.
Definition at line 53 of file MarkovChain.h.
typedef SampleBatch::reference shark::MarkovChain< Operator >::reference |
Mutable reference to an element of the batch.
Definition at line 58 of file MarkovChain.h.
typedef Batch<detail::MarkovChainSample<HiddenSample,VisibleSample> >::type shark::MarkovChain< Operator >::SampleBatch |
A batch of samples containing hidden and visible samples as well as the energies.
Definition at line 55 of file MarkovChain.h.
|
inline |
Constructor.
Definition at line 70 of file MarkovChain.h.
|
inline |
Definition at line 79 of file MarkovChain.h.
|
inline |
Initializes with data points drawn uniform from the set.
dataSet | the data set |
Definition at line 86 of file MarkovChain.h.
|
inline |
Initializes with data points from a batch of points.
sampleData | Data set |
Definition at line 99 of file MarkovChain.h.
|
inline |
Returns the current sample of the Markov chain.
Definition at line 111 of file MarkovChain.h.
|
inline |
Returns the current batch of samples of the Markov chain.
Definition at line 116 of file MarkovChain.h.
|
inline |
Returns the current batch of samples of the Markov chain.
Definition at line 121 of file MarkovChain.h.
|
inline |
Sets the number of parallel samples to be evaluated.
Definition at line 74 of file MarkovChain.h.
|
inline |
Runs the chain for a given number of steps.
numberOfSteps | the number of steps |
Definition at line 106 of file MarkovChain.h.
|
inline |
Returns the transition operator of the Markov chain.
Definition at line 126 of file MarkovChain.h.
|
inline |
Returns the transition operator of the Markov chain.
Definition at line 131 of file MarkovChain.h.
|
static |
The MarkovChain can be used to compute several samples at once.
Definition at line 50 of file MarkovChain.h.