Back-constraints via kernel based regression.
More...
#include <FgKernelBasedRegression.h>
Public Member Functions | |
KBR () | |
Default constructor. More... | |
virtual | ~KBR () |
Destructor. More... | |
virtual void | Init (const af::array &Y, const af::array &X, const af::array &segments) |
Initializes this object. More... | |
virtual int | GetNumParameters () |
Gets number of to be optimized parameters. More... | |
virtual void | SetParameters (const af::array ¶m) |
Sets the parameters. More... | |
virtual af::array | GetParameters () |
Gets the parameters. More... | |
virtual af::array | GetConstraintX () |
Gets constraint x coordinates. More... | |
virtual af::array | BackconstraintGradient (const af::array &gX) |
Back-constraint gradient. More... | |
virtual void | SetKernel (IKernel< Scalar > *inKernel) |
Sets a kernel function. More... | |
virtual IKernel< Scalar > * | GetKernel () |
Gets the kernel function. More... | |
![]() | |
IBackconstraint (BackConstType type) | |
Constructor. More... | |
virtual | ~IBackconstraint () |
Destructor. More... | |
virtual void | Init (const af::array &Y, const af::array &X, const af::array &segments)=0 |
Initializes this object. More... | |
virtual int | GetNumParameters ()=0 |
Gets number of to be optimized parameters. More... | |
virtual void | SetParameters (const af::array ¶m)=0 |
Sets the parameters. More... | |
virtual af::array | GetParameters ()=0 |
Gets the parameters. More... | |
virtual af::array | GetConstraintX ()=0 |
Gets constraint x coordinates. More... | |
virtual af::array | BackconstraintGradient (const af::array &gX)=0 |
Back-constraint gradient. More... | |
BackConstType | GetType () |
Gets the back-constraint type. More... | |
Protected Attributes | |
af::array | afA |
parameters More... | |
af::array | afK |
kernel matrix More... | |
IKernel< Scalar > * | kernel |
kernel function More... | |
![]() | |
int | iN |
dataset length More... | |
int | iq |
latent dimension More... | |
af::dtype | m_dType |
floating point precision flag for af::array More... | |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &ar, unsigned int version) |
Friends | |
class | boost::serialization::access |
Back-constraints via kernel based regression.
Rather than maximising the likelihood with respect to \(\mathbf{X}\) directly, we replace each element of \(\mathbf{X}\) with a mapping of the form:
\[ x_{nj} = g_j(\mathbf{y}_n;\mathbf{w}). \]
Two points in latent space will then be constrained to always be close if their data space counterparts are close. Instead of direct likelihood maximization, we now maximize a constrained likelihood, the constraints preserving nearby ‘localities’. How close is 'nearby' is determined by the smoothness of the mapping. For example we use for the mapping an RBF kernel,
\[ g_j(\mathbf{y}_n) = \sum_{m=1}^N \alpha_{jm} k(\mathbf{y}_n, \mathbf{y}_m), \]
where \(\mathbf{A} = \{\{\alpha_{jn}\}_{n=1}^N\}_{j=1}^q \) are the parameters, and the kernel matrix is,
\[ k(\mathbf{y}_n, \mathbf{y}_m) = \exp\left(-\frac{\gamma}{2}(\mathbf{y}_n − \mathbf{y}_m)^T(\mathbf{y}_n − \mathbf{y}_m)\right), \]
closeness is determined by the setting of the inverse width parameter \(\gamma\).
Reference:
HmetalT, 26.10.2017.
Definition at line 67 of file FgKernelBasedRegression.h.
NeuralEngine::MachineLearning::GPModels::KBR< Scalar >::KBR | ( | ) |
Default constructor.
Hmetal T, 17/09/2020.
|
virtual |
Destructor.
Hmetal T, 17/09/2020.
|
virtual |
Initializes this object.
Hmetal T, 17/09/2020.
Y | An af::array to process. |
X | An af::array to process. |
Implements NeuralEngine::MachineLearning::GPModels::IBackconstraint< Scalar >.
|
virtual |
Gets number of to be optimized parameters.
Hmetal T, 17/09/2020.
Implements NeuralEngine::MachineLearning::GPModels::IBackconstraint< Scalar >.
|
virtual |
Sets the parameters.
Hmetal T, 17/09/2020.
param | The parameter. |
Implements NeuralEngine::MachineLearning::GPModels::IBackconstraint< Scalar >.
|
virtual |
Gets the parameters.
Hmetal T, 17/09/2020.
Implements NeuralEngine::MachineLearning::GPModels::IBackconstraint< Scalar >.
|
virtual |
Gets constraint x coordinates.
Hmetal T, 17/09/2020.
Implements NeuralEngine::MachineLearning::GPModels::IBackconstraint< Scalar >.
|
virtual |
Back-constraint gradient.
Hmetal T, 17/09/2020.
gX | The gradient of \(\mathbf{X}\). |
Implements NeuralEngine::MachineLearning::GPModels::IBackconstraint< Scalar >.
|
virtual |
Sets a kernel function.
Hmetal T, 17/09/2020.
inKernel | [in,out] If non-null, the in kernel. |
|
virtual |
Gets the kernel function.
Hmetal T, 17/09/2020.
|
inlineprivate |
Definition at line 170 of file FgKernelBasedRegression.h.
|
friend |
Definition at line 167 of file FgKernelBasedRegression.h.
|
protected |
parameters
Definition at line 162 of file FgKernelBasedRegression.h.
|
protected |
kernel matrix
Definition at line 163 of file FgKernelBasedRegression.h.
|
protected |
kernel function
Definition at line 164 of file FgKernelBasedRegression.h.