1 #ifndef _LDAPLUSPLUS_ESTEPUTILS_HPP_ 2 #define _LDAPLUSPLUS_ESTEPUTILS_HPP_ 7 namespace e_step_utils {
9 template <
typename Scalar>
10 using MatrixX = Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic>;
11 template <
typename Scalar>
12 using VectorX = Eigen::Matrix<Scalar, Eigen::Dynamic, 1>;
13 using Eigen::VectorXi;
21 template <
typename Scalar>
22 Scalar compute_unsupervised_likelihood(
24 const VectorX<Scalar> &alpha,
25 const MatrixX<Scalar> &beta,
26 const MatrixX<Scalar> &phi,
27 const VectorX<Scalar> &gamma
45 template <
typename Scalar>
46 Scalar compute_supervised_likelihood(
49 const VectorX<Scalar> &alpha,
50 const MatrixX<Scalar> &beta,
51 const MatrixX<Scalar> &eta,
52 const MatrixX<Scalar> &phi,
53 const VectorX<Scalar> &gamma
55 template <
typename Scalar>
56 Scalar compute_supervised_likelihood(
59 const VectorX<Scalar> &alpha,
60 const MatrixX<Scalar> &beta,
61 const MatrixX<Scalar> &eta,
62 const MatrixX<Scalar> &phi,
63 const VectorX<Scalar> &gamma,
64 const VectorX<Scalar> &h
67 template <
typename Scalar>
68 Scalar compute_supervised_multinomial_likelihood(
71 const VectorX<Scalar> &alpha,
72 const MatrixX<Scalar> &beta,
73 const MatrixX<Scalar> &eta,
74 const MatrixX<Scalar> &phi,
75 const VectorX<Scalar> &gamma,
81 template <
typename Scalar>
82 Scalar compute_supervised_correspondence_likelihood(
85 const VectorX<Scalar> &alpha,
86 const MatrixX<Scalar> &beta,
87 const MatrixX<Scalar> &eta,
88 const MatrixX<Scalar> &phi,
89 const VectorX<Scalar> &gamma,
90 const VectorX<Scalar> &tau,
113 template <
typename Scalar>
116 const VectorX<Scalar> & X_ratio,
117 const MatrixX<Scalar> &eta,
118 const MatrixX<Scalar> &phi,
119 Ref<VectorX<Scalar> > h
122 template <
typename Scalar>
123 void compute_supervised_phi_gamma(
125 const VectorX<Scalar> & X_ratio,
127 const MatrixX<Scalar> & beta,
128 const MatrixX<Scalar> & eta,
129 size_t fixed_point_iterations,
130 Ref<MatrixX<Scalar> > phi,
131 Ref<VectorX<Scalar> > gamma,
132 Ref<VectorX<Scalar> > h
145 template <
typename Scalar>
148 const VectorX<Scalar> & alpha,
149 const MatrixX<Scalar> & phi,
150 Ref<VectorX<Scalar> > gamma
166 template <
typename Scalar>
167 void compute_unsupervised_phi(
168 const MatrixX<Scalar> & beta,
169 const VectorX<Scalar> & gamma,
170 Ref<MatrixX<Scalar> > phi
178 template <
typename Scalar>
179 void compute_supervised_approximate_phi(
180 const VectorX<Scalar> & X_ratio,
183 const MatrixX<Scalar> & beta,
184 const MatrixX<Scalar> & eta,
185 const VectorX<Scalar> & gamma,
187 Ref<MatrixX<Scalar> > phi
190 template <
typename Scalar>
191 void compute_supervised_multinomial_phi(
194 const MatrixX<Scalar> & beta,
195 const MatrixX<Scalar> & eta,
196 const VectorX<Scalar> & gamma,
198 Ref<MatrixX<Scalar> > phi
201 template <
typename Scalar>
202 void compute_supervised_correspondence_phi(
205 const MatrixX<Scalar> & beta,
206 const MatrixX<Scalar> & eta,
207 const VectorX<Scalar> & gamma,
208 const VectorX<Scalar> & tau,
209 Ref<MatrixX<Scalar> > phi
212 template <
typename Scalar>
213 void compute_supervised_correspondence_tau(
216 const MatrixX<Scalar> & eta,
217 const MatrixX<Scalar> & phi,
218 Ref<VectorX<Scalar> > tau
223 #endif // _LDAPLUSPLUS_ESTEPUTILS_HPP_ Definition: Document.hpp:11