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. | |
| typedef Batch< detail::MarkovChainSample< HiddenSample, VisibleSample > >::type | SampleBatch | 
| A batch of samples containing hidden and visible samples as well as the energies. | |
| typedef SampleBatch::reference | reference | 
| Mutable reference to an element of the batch. | |
| typedef SampleBatch::const_reference | const_reference | 
| Immutable reference to an element of the batch. | |
| Public Member Functions | |
| MarkovChain (RBM *rbm) | |
| Constructor. | |
| void | setBatchSize (std::size_t batchSize) | 
| Sets the number of parallel samples to be evaluated. | |
| std::size_t | batchSize () | 
| void | initializeChain (Data< RealVector > const &dataSet) | 
| Initializes with data points drawn uniform from the set. | |
| void | initializeChain (RealMatrix const &sampleData) | 
| Initializes with data points from a batch of points. | |
| void | step (unsigned int numberOfSteps) | 
| Runs the chain for a given number of steps. | |
| const_reference | sample () const | 
| Returns the current sample of the Markov chain. | |
| SampleBatch const & | samples () const | 
| Returns the current batch of samples of the Markov chain. | |
| SampleBatch & | samples () | 
| Returns the current batch of samples of the Markov chain. | |
| Operator const & | transitionOperator () const | 
| Returns the transition operator of the Markov chain. | |
| Operator & | transitionOperator () | 
| Returns the transition operator of the Markov chain. | |
| Static Public Attributes | |
| static const bool | computesBatch = true | 
| The MarkovChain can be used to compute several samples at once. | |
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.
Referenced by shark::MarkovChain< Operator >::setBatchSize(), and shark::MarkovChain< Operator >::step().
| 
 | inline | 
Initializes with data points drawn uniform from the set.
| dataSet | the data set | 
Definition at line 86 of file MarkovChain.h.
References shark::random::discrete(), shark::Data< Type >::element(), shark::MarkovChain< Operator >::initializeChain(), and shark::Data< Type >::numberOfElements().
Referenced by shark::MarkovChain< Operator >::initializeChain().
| 
 | 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 121 of file MarkovChain.h.
| 
 | inline | 
Returns the current batch of samples of the Markov chain.
Definition at line 116 of file MarkovChain.h.
| 
 | inline | 
Sets the number of parallel samples to be evaluated.
Definition at line 74 of file MarkovChain.h.
References shark::MarkovChain< Operator >::batchSize().
| 
 | inline | 
Runs the chain for a given number of steps.
| numberOfSteps | the number of steps | 
Definition at line 106 of file MarkovChain.h.
References shark::MarkovChain< Operator >::batchSize().
| 
 | inline | 
Returns the transition operator of the Markov chain.
Definition at line 131 of file MarkovChain.h.
| 
 | inline | 
Returns the transition operator of the Markov chain.
Definition at line 126 of file MarkovChain.h.
| 
 | static | 
The MarkovChain can be used to compute several samples at once.
Definition at line 50 of file MarkovChain.h.