Public Member Functions | |
IKernel (KernelType type, int numParameters) | |
Constructor. More... | |
virtual | ~IKernel () |
Destructor. More... | |
virtual int | GetNumParameter () |
Gets number of parametes of the kernel. More... | |
virtual KernelType | GetKernelType () |
Gets kernel type. More... | |
virtual void | ComputeKernelMatrix (const af::array &inX1, const af::array &inX2, af::array &outMatrix)=0 |
Computes the kernel matrix of the kernel. More... | |
virtual void | ComputeDiagonal (const af::array &inX, af::array &outDiagonal)=0 |
Calculates only diagonal elements of K. More... | |
virtual void | LogLikGradientX (const af::array &inX, const af::array &indL_dK, af::array &outdL_dX)=0 |
Computes dL/dX for full fit GP. More... | |
virtual void | LogLikGradientX (const af::array &inXu, const af::array &indL_dKuu, const af::array &inX, const af::array &indL_dKuf, af::array &outdL_dXu, af::array &outdL_dX)=0 |
Computes dL / dX and dL / dXu for sparse approximation GP. More... | |
virtual void | LogLikGradientX (const af::array &inX1, const af::array &inX2, const af::array &indL_dK, af::array &outdL_dX) |
Computes dL / dX for sparse approximation GP. More... | |
virtual void | LogLikGradientParam (const af::array &inX1, const af::array &inX2, const af::array &indL_dK, af::array &outdL_dParam)=0 |
Computes the gradient of LL w.r.t. the kernel parameters. More... | |
virtual void | LogLikGradientParam (const af::array &inX1, const af::array &inX2, const af::array &indL_dK, af::array &outdL_dParam, const af::array *dlogZ_dv) |
Computes the gradient of LL w.r.t. the kernel parameters. More... | |
virtual void | LogLikGradientCompundKfu (const af::array &indL_dKfu, const af::array &inX, const af::array &inXu, af::array *outdL_dParam, af::array *outdL_dXu, const af::array *dlogZ_dv=nullptr, af::array *outdL_dX=nullptr) |
virtual void | LogGradientCompoundKuu (const af::array &inXu, const af::array &inCovDiag, af::array *outdL_dParam, af::array *outdL_dXu) |
virtual void | GradX (const af::array &inX1, const af::array &inX2, int q, af::array &outdK_dX)=0 |
Computes dK/dX. More... | |
virtual void | DiagGradX (const af::array &inX, af::array &outDiagdK_dX)=0 |
Derivative of diagonal elemts of K w.r.t X. More... | |
virtual void | DiagGradParam (const af::array &inX, const af::array &inCovDiag, af::array &outDiagdK_dParam)=0 |
Derivative of diagonal elemts of K w.r.t kernel parameters. More... | |
virtual void | SetParameters (const af::array ¶m)=0 |
Sets the parameters. More... | |
virtual void | SetLogParameters (const af::array ¶m) |
Sets log parameters. More... | |
virtual af::array | GetParameters ()=0 |
Gets the parameters. More... | |
virtual af::array | GetLogParameters () |
Gets log parameters. More... | |
virtual void | InitParameters (Scalar inMedian) |
Initializes the parameters based on the median of the distances of /f$\mathbf{X}/f$. More... | |
virtual void | ComputePsiStatistics (const af::array &inXu, const af::array &inMu, const af::array &inS, af::array &outPsi0, af::array &outPsi1, af::array &outPsi2) |
PSI statistics. More... | |
virtual void | PsiDerivatives (const af::array &indL_dPsi0, const af::array &inPsi1, const af::array &indL_dPsi1, const af::array &inPsi2, const af::array &indL_dPsi2, const af::array &inXu, const af::array &inMu, const af::array &inS, af::array &outdL_dParam, af::array &outdL_dXu, af::array &outdL_dMu, af::array &outdL_dS, const af::array *dlogZ_dv=nullptr) |
Psi derivatives. More... | |
Protected Member Functions | |
IKernel () | |
Default constructor. More... | |
Protected Attributes | |
KernelType | eType |
int | iNumParam |
af::dtype | m_dType |
Scalar | sDegree |
af::array | afGHx |
af::array | afGHw |
af::array | afXs |
bool | bCacheK |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &ar, unsigned int version) |
Friends | |
class | boost::serialization::access |
Definition at line 35 of file FgIKernel.h.
NeuralEngine::MachineLearning::IKernel< Scalar >::IKernel | ( | KernelType | type, |
int | numParameters | ||
) |
Constructor.
Admin, 5/26/2017.
type | The type. |
numParam | Number of parameters. |
|
virtual |
Destructor.
Admin, 5/26/2017.
|
inlineprotected |
|
virtual |
Gets number of parametes of the kernel.
Admin, 5/24/2017.
|
virtual |
Gets kernel type.
Admin, 5/24/2017.
|
pure virtual |
Computes the kernel matrix of the kernel.
Admin, 5/23/2017.
inX1 | [in,out] First n times q matrix of latent points. |
inX2 | [in,out] Second m times q matrix of latent points (X'). |
outMatrix | [in,out] Resulting kernel matrix.< / param> |
Implemented in NeuralEngine::MachineLearning::ARDKernel< Scalar >, NeuralEngine::MachineLearning::CompoundKernel< Scalar >, NeuralEngine::MachineLearning::InterDomainKernel< Scalar >, NeuralEngine::MachineLearning::LinearAccelerationKernel< Scalar >, NeuralEngine::MachineLearning::LinearKernel< Scalar >, NeuralEngine::MachineLearning::RBFAccelerationKernel< Scalar >, NeuralEngine::MachineLearning::RBFKernel< Scalar >, NeuralEngine::MachineLearning::StyleKernel< Scalar >, NeuralEngine::MachineLearning::TensorKernel< Scalar >, and NeuralEngine::MachineLearning::WhiteKernel< Scalar >.
|
pure virtual |
Calculates only diagonal elements of K.
Admin, 5/24/2017.
inX | [in,out] Nxq matrix X. |
outDiagonal | [in,out] The out diagonal. |
Implemented in NeuralEngine::MachineLearning::ARDKernel< Scalar >, NeuralEngine::MachineLearning::CompoundKernel< Scalar >, NeuralEngine::MachineLearning::InterDomainKernel< Scalar >, NeuralEngine::MachineLearning::LinearAccelerationKernel< Scalar >, NeuralEngine::MachineLearning::LinearKernel< Scalar >, NeuralEngine::MachineLearning::RBFAccelerationKernel< Scalar >, NeuralEngine::MachineLearning::RBFKernel< Scalar >, NeuralEngine::MachineLearning::StyleKernel< Scalar >, NeuralEngine::MachineLearning::TensorKernel< Scalar >, and NeuralEngine::MachineLearning::WhiteKernel< Scalar >.
|
pure virtual |
Computes dL/dX for full fit GP.
Admin, 5/23/2017.
inX | [in,out] Nxq Matrix of latent points. |
indL_dK | [in,out] Derivative of the loglikelihood w.r.t kernel matrix K. |
outdL_dX | [in,out] Derivative of the loglikelihood w.r.t latent points. |
Implemented in NeuralEngine::MachineLearning::ARDKernel< Scalar >, NeuralEngine::MachineLearning::CompoundKernel< Scalar >, NeuralEngine::MachineLearning::InterDomainKernel< Scalar >, NeuralEngine::MachineLearning::LinearAccelerationKernel< Scalar >, NeuralEngine::MachineLearning::LinearKernel< Scalar >, NeuralEngine::MachineLearning::RBFAccelerationKernel< Scalar >, NeuralEngine::MachineLearning::RBFKernel< Scalar >, NeuralEngine::MachineLearning::StyleKernel< Scalar >, NeuralEngine::MachineLearning::TensorKernel< Scalar >, and NeuralEngine::MachineLearning::WhiteKernel< Scalar >.
|
pure virtual |
Computes dL / dX and dL / dXu for sparse approximation GP.
Admin, 5/23/2017.
inXu | [in,out] kxq Matrix of latent subset points. |
indL_dKuu | [in,out] Derivative of the loglikelihood w.r.t subset kernel matrix Kuu. |
inX | [in,out] Nxq Matrix of latent points. |
indL_dKuf | [in,out] Derivative of the loglikelihood w.r.t the kernel matrix K. |
outdL_dXu | [in,out] Derivative of the loglikelihood w.r.t latent subset points Xu. |
outdL_dX | [in,out] Derivative of the loglikelihood w.r.t latent points X. |
Implemented in NeuralEngine::MachineLearning::ARDKernel< Scalar >, NeuralEngine::MachineLearning::CompoundKernel< Scalar >, NeuralEngine::MachineLearning::InterDomainKernel< Scalar >, NeuralEngine::MachineLearning::LinearAccelerationKernel< Scalar >, NeuralEngine::MachineLearning::LinearKernel< Scalar >, NeuralEngine::MachineLearning::RBFAccelerationKernel< Scalar >, NeuralEngine::MachineLearning::RBFKernel< Scalar >, NeuralEngine::MachineLearning::StyleKernel< Scalar >, NeuralEngine::MachineLearning::TensorKernel< Scalar >, and NeuralEngine::MachineLearning::WhiteKernel< Scalar >.
|
inlinevirtual |
Computes dL / dX for sparse approximation GP.
Hmetal T, 25/11/2020.
inX1 | The first latent points. |
inX2 | The second latent points. |
indL_dK | The derivative dL / dK. |
outdL_dX | [in,out] The derivative dL / dX. |
Reimplemented in NeuralEngine::MachineLearning::ARDKernel< Scalar >, NeuralEngine::MachineLearning::InterDomainKernel< Scalar >, NeuralEngine::MachineLearning::LinearKernel< Scalar >, NeuralEngine::MachineLearning::StyleKernel< Scalar >, and NeuralEngine::MachineLearning::TensorKernel< Scalar >.
Definition at line 137 of file FgIKernel.h.
|
pure virtual |
Computes the gradient of LL w.r.t. the kernel parameters.
Admin, 5/23/2017.
indL_dK | [in,out] Derivative of the loglikelihood w.r.t the kernel matrix K. |
outdL_dParam | [in,out] Gradient of kernel parameters. |
Implemented in NeuralEngine::MachineLearning::ARDKernel< Scalar >, NeuralEngine::MachineLearning::CompoundKernel< Scalar >, NeuralEngine::MachineLearning::InterDomainKernel< Scalar >, NeuralEngine::MachineLearning::LinearAccelerationKernel< Scalar >, NeuralEngine::MachineLearning::LinearKernel< Scalar >, NeuralEngine::MachineLearning::RBFAccelerationKernel< Scalar >, NeuralEngine::MachineLearning::RBFKernel< Scalar >, NeuralEngine::MachineLearning::StyleKernel< Scalar >, NeuralEngine::MachineLearning::TensorKernel< Scalar >, and NeuralEngine::MachineLearning::WhiteKernel< Scalar >.
|
inlinevirtual |
Computes the gradient of LL w.r.t. the kernel parameters.
Admin, 5/23/2017.
indL_dK | [in,out] Derivative of the loglikelihood w.r.t the kernel matrix K. |
outdL_dParam | [in,out] Gradient of kernel parameters. |
Reimplemented in NeuralEngine::MachineLearning::ARDKernel< Scalar >, NeuralEngine::MachineLearning::InterDomainKernel< Scalar >, NeuralEngine::MachineLearning::LinearKernel< Scalar >, NeuralEngine::MachineLearning::StyleKernel< Scalar >, and NeuralEngine::MachineLearning::TensorKernel< Scalar >.
Definition at line 161 of file FgIKernel.h.
|
inlinevirtual |
Definition at line 163 of file FgIKernel.h.
|
inlinevirtual |
Definition at line 166 of file FgIKernel.h.
|
pure virtual |
Computes dK/dX.
Admin, 5/23/2017.
inX1 | [in,out] First n times q matrix of latent points. |
inX2 | [in,out] Second n times q matrix of latent points (X'). |
q | The latent dimension to process. |
outdK_dX | [in,out] dK/dX. |
Implemented in NeuralEngine::MachineLearning::ARDKernel< Scalar >, NeuralEngine::MachineLearning::CompoundKernel< Scalar >, NeuralEngine::MachineLearning::InterDomainKernel< Scalar >, NeuralEngine::MachineLearning::LinearAccelerationKernel< Scalar >, NeuralEngine::MachineLearning::LinearKernel< Scalar >, NeuralEngine::MachineLearning::RBFAccelerationKernel< Scalar >, NeuralEngine::MachineLearning::RBFKernel< Scalar >, NeuralEngine::MachineLearning::StyleKernel< Scalar >, NeuralEngine::MachineLearning::TensorKernel< Scalar >, and NeuralEngine::MachineLearning::WhiteKernel< Scalar >.
|
pure virtual |
Derivative of diagonal elemts of K w.r.t X.
Admin, 5/23/2017.
inX | [in,out] The in x coordinate. |
outDiagdK_dX | [in,out] Derivative of diagonal elemts of K w.r.t X. |
Implemented in NeuralEngine::MachineLearning::ARDKernel< Scalar >, NeuralEngine::MachineLearning::CompoundKernel< Scalar >, NeuralEngine::MachineLearning::InterDomainKernel< Scalar >, NeuralEngine::MachineLearning::LinearAccelerationKernel< Scalar >, NeuralEngine::MachineLearning::LinearKernel< Scalar >, NeuralEngine::MachineLearning::RBFAccelerationKernel< Scalar >, NeuralEngine::MachineLearning::RBFKernel< Scalar >, NeuralEngine::MachineLearning::StyleKernel< Scalar >, NeuralEngine::MachineLearning::TensorKernel< Scalar >, and NeuralEngine::MachineLearning::WhiteKernel< Scalar >.
|
pure virtual |
Derivative of diagonal elemts of K w.r.t kernel parameters.
Admin, 5/23/2017.
inX | [in,out] Nxq matrix of Latent points X. |
inCovDiag | [in,out] Diagonal of kernel matrix K. |
outDiagdK_dParam | [in,out] Derivative of diagonal elemts of K w.r.t kernel parameters. |
Implemented in NeuralEngine::MachineLearning::ARDKernel< Scalar >, NeuralEngine::MachineLearning::CompoundKernel< Scalar >, NeuralEngine::MachineLearning::InterDomainKernel< Scalar >, NeuralEngine::MachineLearning::LinearAccelerationKernel< Scalar >, NeuralEngine::MachineLearning::LinearKernel< Scalar >, NeuralEngine::MachineLearning::RBFAccelerationKernel< Scalar >, NeuralEngine::MachineLearning::RBFKernel< Scalar >, NeuralEngine::MachineLearning::StyleKernel< Scalar >, NeuralEngine::MachineLearning::TensorKernel< Scalar >, and NeuralEngine::MachineLearning::WhiteKernel< Scalar >.
|
pure virtual |
Sets the parameters.
, 26.06.2018.
param | The parameter. |
Implemented in NeuralEngine::MachineLearning::ARDKernel< Scalar >, NeuralEngine::MachineLearning::CompoundKernel< Scalar >, NeuralEngine::MachineLearning::InterDomainKernel< Scalar >, NeuralEngine::MachineLearning::LinearAccelerationKernel< Scalar >, NeuralEngine::MachineLearning::LinearKernel< Scalar >, NeuralEngine::MachineLearning::RBFAccelerationKernel< Scalar >, NeuralEngine::MachineLearning::RBFKernel< Scalar >, NeuralEngine::MachineLearning::StyleKernel< Scalar >, NeuralEngine::MachineLearning::TensorKernel< Scalar >, and NeuralEngine::MachineLearning::WhiteKernel< Scalar >.
|
inlinevirtual |
Sets log parameters.
Hmetal T, 06/11/2020.
param | The parameter. |
Reimplemented in NeuralEngine::MachineLearning::ARDKernel< Scalar >, NeuralEngine::MachineLearning::InterDomainKernel< Scalar >, NeuralEngine::MachineLearning::LinearKernel< Scalar >, NeuralEngine::MachineLearning::RBFKernel< Scalar >, NeuralEngine::MachineLearning::StyleKernel< Scalar >, and NeuralEngine::MachineLearning::TensorKernel< Scalar >.
Definition at line 218 of file FgIKernel.h.
|
pure virtual |
Gets the parameters.
, 26.06.2018.
Implemented in NeuralEngine::MachineLearning::ARDKernel< Scalar >, NeuralEngine::MachineLearning::CompoundKernel< Scalar >, NeuralEngine::MachineLearning::InterDomainKernel< Scalar >, NeuralEngine::MachineLearning::LinearAccelerationKernel< Scalar >, NeuralEngine::MachineLearning::LinearKernel< Scalar >, NeuralEngine::MachineLearning::RBFAccelerationKernel< Scalar >, NeuralEngine::MachineLearning::RBFKernel< Scalar >, NeuralEngine::MachineLearning::StyleKernel< Scalar >, NeuralEngine::MachineLearning::TensorKernel< Scalar >, and NeuralEngine::MachineLearning::WhiteKernel< Scalar >.
|
inlinevirtual |
Gets log parameters.
Hmetal T, 06/11/2020.
Reimplemented in NeuralEngine::MachineLearning::ARDKernel< Scalar >, NeuralEngine::MachineLearning::InterDomainKernel< Scalar >, NeuralEngine::MachineLearning::LinearKernel< Scalar >, NeuralEngine::MachineLearning::RBFKernel< Scalar >, NeuralEngine::MachineLearning::StyleKernel< Scalar >, and NeuralEngine::MachineLearning::TensorKernel< Scalar >.
Definition at line 236 of file FgIKernel.h.
|
inlinevirtual |
Initializes the parameters based on the median of the distances of /f$\mathbf{X}/f$.
Hmetal T, 06/11/2020.
inMedian | The in median. |
Reimplemented in NeuralEngine::MachineLearning::ARDKernel< Scalar >, NeuralEngine::MachineLearning::InterDomainKernel< Scalar >, NeuralEngine::MachineLearning::LinearKernel< Scalar >, NeuralEngine::MachineLearning::StyleKernel< Scalar >, and NeuralEngine::MachineLearning::TensorKernel< Scalar >.
Definition at line 248 of file FgIKernel.h.
|
virtual |
PSI statistics.
PSI statistics computation.
An approximated psi-statistics based on Gauss-Hermite Quadrature
HmetalT, 15/07/2019.
inZ | Log normalizer. |
inMu | Posterior mean. |
inS | Posterior covariance. |
outPsi0 | [in,out] Psi0. |
outPsi1 | [in,out] Psi1. |
outPsi2 | [in,out] Psi2. |
Reimplemented in NeuralEngine::MachineLearning::ARDKernel< Scalar >, NeuralEngine::MachineLearning::InterDomainKernel< Scalar >, NeuralEngine::MachineLearning::LinearKernel< Scalar >, and NeuralEngine::MachineLearning::TensorKernel< Scalar >.
|
virtual |
Psi derivatives.
Hmetal T, 10/11/2020.
inPsi1 | The first in psi. |
indL_dPsi1 | The first ind l d psi. |
inPsi2 | The second in psi. |
indL_dPsi2 | The second ind l d psi. |
inXu | The in xu. |
inMu | The in mu. |
inS | The in s. |
outdL_dParam | [in,out] The outd l d parameter. |
outdL_dXu | [in,out] The outd l d xu. |
outdL_dMu | [in,out] The outd l d mu. |
outdL_dS | [in,out] The outd l d s. |
dlogZ_dv | (Optional) The dlog z coordinate dv. |
Reimplemented in NeuralEngine::MachineLearning::ARDKernel< Scalar >, NeuralEngine::MachineLearning::InterDomainKernel< Scalar >, NeuralEngine::MachineLearning::LinearKernel< Scalar >, and NeuralEngine::MachineLearning::TensorKernel< Scalar >.
|
inlineprivate |
Definition at line 322 of file FgIKernel.h.
|
friend |
Definition at line 319 of file FgIKernel.h.
|
protected |
Definition at line 306 of file FgIKernel.h.
|
protected |
Definition at line 307 of file FgIKernel.h.
|
protected |
Definition at line 309 of file FgIKernel.h.
|
protected |
Definition at line 312 of file FgIKernel.h.
|
protected |
Definition at line 313 of file FgIKernel.h.
|
protected |
Definition at line 314 of file FgIKernel.h.
|
protected |
Definition at line 315 of file FgIKernel.h.
|
protected |
Definition at line 316 of file FgIKernel.h.