#include <shark/Unsupervised/RBM/Sampling/TemperedMarkovChain.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 | |
TemperedMarkovChain (RBM *rbm) | |
const Operator & | transitionOperator () const |
Operator & | transitionOperator () |
void | setNumberOfTemperatures (std::size_t temperatures) |
Sets the number of temperatures and initializes the tempered chains accordingly. More... | |
void | setUniformTemperatureSpacing (std::size_t temperatures) |
Sets the number of temperatures and initializes them in a uniform spacing. More... | |
std::size_t | numberOfTemperatures () const |
Returns the number Of temperatures. More... | |
void | setBatchSize (std::size_t batchSize) |
std::size_t | batchSize () |
void | setBeta (std::size_t i, double beta) |
double | beta (std::size_t i) const |
RealVector const & | beta () const |
const_reference | sample () const |
Returns the current state of the chain for beta = 1. More... | |
SampleBatch const & | samples () const |
Returns the current state of the chain for all beta values. More... | |
SampleBatch & | samples () |
Returns the current batch of samples of the Markov chain. More... | |
void | initializeChain (Data< RealVector > const &dataSet) |
Initializes the markov chain using samples drawn uniformly from the set. More... | |
void | initializeChain (RealMatrix const &sampleData) |
Initializes with data points from a batch of points. More... | |
void | step (unsigned int k) |
Static Public Attributes | |
static const bool | computesBatch = false |
The MarkovChain can't be used to compute several samples at once. More... | |
Definition at line 45 of file TemperedMarkovChain.h.
typedef SampleBatch::const_reference shark::TemperedMarkovChain< Operator >::const_reference |
Immutable reference to an element of the batch.
Definition at line 67 of file TemperedMarkovChain.h.
typedef Operator::RBM shark::TemperedMarkovChain< Operator >::RBM |
The type of the RBM the operator is working with.
Definition at line 58 of file TemperedMarkovChain.h.
typedef SampleBatch::reference shark::TemperedMarkovChain< Operator >::reference |
Mutable reference to an element of the batch.
Definition at line 64 of file TemperedMarkovChain.h.
typedef Batch<detail::MarkovChainSample<HiddenSample,VisibleSample> >::type shark::TemperedMarkovChain< Operator >::SampleBatch |
A batch of samples containing hidden and visible samples as well as the energies.
Definition at line 61 of file TemperedMarkovChain.h.
|
inline |
Definition at line 88 of file TemperedMarkovChain.h.
|
inline |
Definition at line 129 of file TemperedMarkovChain.h.
|
inline |
Definition at line 138 of file TemperedMarkovChain.h.
References SIZE_CHECK.
Referenced by shark::EnergyStoringTemperedMarkovChain< Operator >::beta().
|
inline |
Definition at line 143 of file TemperedMarkovChain.h.
Referenced by shark::TemperedMarkovChain< Operator >::setBeta().
|
inline |
Initializes the markov chain using samples drawn uniformly from the set.
Be aware that the number of chains and the temperatures need to bee specified previously.
dataSet | the data set |
Definition at line 165 of file TemperedMarkovChain.h.
References SHARK_RUNTIME_CHECK.
Referenced by shark::EnergyStoringTemperedMarkovChain< Operator >::initializeChain().
|
inline |
Initializes with data points from a batch of points.
Be aware that the number of chains and the temperatures need to bee specified previously.
sampleData | the data set |
Definition at line 180 of file TemperedMarkovChain.h.
References SHARK_RUNTIME_CHECK.
|
inline |
Returns the number Of temperatures.
Definition at line 122 of file TemperedMarkovChain.h.
Referenced by shark::EnergyStoringTemperedMarkovChain< Operator >::numberOfTemperatures().
|
inline |
Returns the current state of the chain for beta = 1.
Definition at line 148 of file TemperedMarkovChain.h.
Referenced by shark::EnergyStoringTemperedMarkovChain< Operator >::sample().
|
inline |
Returns the current state of the chain for all beta values.
Definition at line 152 of file TemperedMarkovChain.h.
Referenced by shark::EnergyStoringTemperedMarkovChain< Operator >::samples().
|
inline |
Returns the current batch of samples of the Markov chain.
Definition at line 157 of file TemperedMarkovChain.h.
|
inline |
Definition at line 126 of file TemperedMarkovChain.h.
References SHARK_RUNTIME_CHECK.
|
inline |
Definition at line 133 of file TemperedMarkovChain.h.
References shark::TemperedMarkovChain< Operator >::beta(), and SIZE_CHECK.
Referenced by shark::EnergyStoringTemperedMarkovChain< Operator >::setBeta(), and shark::TemperedMarkovChain< Operator >::setUniformTemperatureSpacing().
|
inline |
Sets the number of temperatures and initializes the tempered chains accordingly.
temperatures | number of temperatures |
Definition at line 101 of file TemperedMarkovChain.h.
Referenced by shark::EnergyStoringTemperedMarkovChain< Operator >::setNumberOfTemperatures(), and shark::TemperedMarkovChain< Operator >::setUniformTemperatureSpacing().
|
inline |
Sets the number of temperatures and initializes them in a uniform spacing.
Temperatures are spaced equally between 0 and 1.
temperatures | number of temperatures |
Definition at line 112 of file TemperedMarkovChain.h.
References shark::TemperedMarkovChain< Operator >::setBeta(), and shark::TemperedMarkovChain< Operator >::setNumberOfTemperatures().
Referenced by shark::EnergyStoringTemperedMarkovChain< Operator >::setUniformTemperatureSpacing().
|
inline |
Definition at line 191 of file TemperedMarkovChain.h.
Referenced by shark::EnergyStoringTemperedMarkovChain< Operator >::step().
|
inline |
Definition at line 90 of file TemperedMarkovChain.h.
Referenced by shark::EnergyStoringTemperedMarkovChain< Operator >::transitionOperator().
|
inline |
Definition at line 93 of file TemperedMarkovChain.h.
|
static |
The MarkovChain can't be used to compute several samples at once.
The tempered markov chain ues it's batch capabilities allready to compute the samples for all temperatures At the same time. Also it is much more powerfull when all samples are drawn one after another for a higher mixing rate.
Definition at line 55 of file TemperedMarkovChain.h.