49 using namespace Eigen;
66 void CKLLowerTriangularInferenceMethod::init()
72 "The mean vector generated from mean function",
75 "The Log-determinant of Kernel",
79 "The L*sqrt(D) matrix, where L and D are defined in LDLT factorization on Kernel*sq(m_scale)",
82 "The permutation sequence of P, where P are defined in LDLT factorization on Kernel*sq(m_scale)",
114 eigen_Kernel_LsD.triangularView<Lower>()=Kernel_L*Kernel_D.array().sqrt().matrix().asDiagonal();
121 eigen_Kernel_P=ldlt.transpositionsP()*eigen_Kernel_P;
139 P.applyTranspositionOnTheLeft(i,tmp[i]);
148 MatrixXd tmp2=eigen_Kernel_LsD.triangularView<Lower>().solve(tmp1);
149 MatrixXd tmp3=eigen_Kernel_LsD.triangularView<Lower>().transpose().solve(tmp2);
150 return P.transpose()*tmp3;
161 MatrixXd tmp1=eigen_InvK_Sigma+eigen_alpha*(eigen_mu.transpose());
164 return 0.5*(tmp3.array()*eigen_dK.array()).sum();
SGMatrix< float64_t > m_Kernel_LsD
SGVector< float64_t > m_alpha
virtual float64_t get_derivative_related_cov(SGMatrix< float64_t > dK)
The class Labels models labels, i.e. class assignments of objects.
virtual void update_InvK_Sigma()=0
SGVector< index_t > m_Kernel_P
virtual ~CKLLowerTriangularInferenceMethod()
virtual SGVector< float64_t > get_mean_vector(const CFeatures *features) const =0
CKLLowerTriangularInferenceMethod()
Eigen::MatrixXd solve_inverse(Eigen::MatrixXd A)
An abstract class of the mean function.
virtual SGVector< float64_t > get_diagonal_vector()
SGMatrix< float64_t > m_L
virtual void update_deriv()
virtual void update_init()
virtual void update_chol()
virtual Eigen::LDLT< Eigen::MatrixXd, 0x1 > update_init_helper()
The KL approximation inference method class.
all of classes and functions are contained in the shogun namespace
The class Features is the base class of all feature objects.
SGVector< float64_t > m_mu
SGMatrix< float64_t > m_InvK_Sigma
SGVector< T > clone() const
virtual void update_Sigma()=0
SGVector< float64_t > m_mean_vec
float64_t m_log_det_Kernel
The Likelihood model base class.
SGMatrix< float64_t > m_ktrtr
virtual void update_approx_cov()