XMM - Probabilistic Models for Motion Recognition and Mapping

xmmHmmParameters.hpp
Go to the documentation of this file.
1 /*
2  * xmmHmmParameters.hpp
3  *
4  * Parameters of Hidden Markov Models
5  *
6  * Contact:
7  * - Jules Francoise <jules.francoise@ircam.fr>
8  *
9  * This code has been initially authored by Jules Francoise
10  * <http://julesfrancoise.com> during his PhD thesis, supervised by Frederic
11  * Bevilacqua <href="http://frederic-bevilacqua.net>, in the Sound Music
12  * Movement Interaction team <http://ismm.ircam.fr> of the
13  * STMS Lab - IRCAM, CNRS, UPMC (2011-2015).
14  *
15  * Copyright (C) 2015 UPMC, Ircam-Centre Pompidou.
16  *
17  * This File is part of XMM.
18  *
19  * XMM is free software: you can redistribute it and/or modify
20  * it under the terms of the GNU General Public License as published by
21  * the Free Software Foundation, either version 3 of the License, or
22  * (at your option) any later version.
23  *
24  * XMM is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27  * GNU General Public License for more details.
28  *
29  * You should have received a copy of the GNU General Public License
30  * along with XMM. If not, see <http://www.gnu.org/licenses/>.
31  */
32 
33 #ifndef xmmHmmParameters_hpp
34 #define xmmHmmParameters_hpp
35 
36 #include "../../core/distributions/xmmGaussianDistribution.hpp"
37 #include "../../core/model/xmmModelParameters.hpp"
38 
39 namespace xmm {
43 class HMM {
44  public:
48  enum class TransitionMode {
52  Ergodic = 0,
53 
59  LeftRight = 1
60  };
61 
66  enum class RegressionEstimator {
70  Full = 0,
71 
77  Windowed = 1,
78 
83  Likeliest = 2
84  };
85 };
86 
91 template <>
93  public:
98 
103  ClassParameters(ClassParameters const& src);
104 
109  explicit ClassParameters(Json::Value const& root);
110 
115  ClassParameters& operator=(ClassParameters const& src);
116 
118 
124  Json::Value toJson() const;
125 
131  virtual void fromJson(Json::Value const& root);
132 
134 
138  bool changed = false;
139 
144 
149 
155 
161 
166 
171 
176 
182 
183  protected:
187  virtual void onAttributeChange(AttributeBase* attr_pointer);
188 };
189 
190 template <>
191 void checkLimits<HMM::TransitionMode>(HMM::TransitionMode const& value,
192  HMM::TransitionMode const& limit_min,
193  HMM::TransitionMode const& limit_max);
194 
195 template <>
197 
198 template <>
199 void checkLimits<HMM::RegressionEstimator>(
200  HMM::RegressionEstimator const& value,
201  HMM::RegressionEstimator const& limit_min,
202  HMM::RegressionEstimator const& limit_max);
203 
204 template <>
206 }
207 
208 #endif
RegressionEstimator
Estimator for the regression with HMMs.
Definition: xmmHmmParameters.hpp:66
Attribute< unsigned int > states
Number of hidden states.
Definition: xmmHmmParameters.hpp:143
Attribute< GaussianDistribution::CovarianceMode > covariance_mode
Covariance Mode.
Definition: xmmHmmParameters.hpp:165
Left-Right Transition model.
Attribute< double > relative_regularization
Offset Added to the diagonal of covariance matrices for convergence (Relative to Data Variance) ...
Definition: xmmHmmParameters.hpp:154
Ergodic Transition Matrix.
the output is estimated as the output values of the likeliest class
Base Class for Generic Attributes.
Definition: xmmAttribute.hpp:105
Attribute< HMM::TransitionMode > transition_mode
Transition matrix of the model (left-right vs ergodic)
Definition: xmmHmmParameters.hpp:170
Attribute< unsigned int > gaussians
Number of Gaussian Mixture Components.
Definition: xmmHmmParameters.hpp:148
Definition: xmmHmmParameters.hpp:43
TransitionMode
Type of Transition Matrix.
Definition: xmmHmmParameters.hpp:48
Attribute< HMM::RegressionEstimator > regression_estimator
Type of regression estimator.
Definition: xmmHmmParameters.hpp:175
Attribute< bool > hierarchical
specifies if the decoding algorithm is hierarchical or class-conditional
Definition: xmmHmmParameters.hpp:181
Definition: xmmAttribute.hpp:42
Class-specific Model Parameters.
Definition: xmmModelParameters.hpp:48
Attribute< double > absolute_regularization
Offset Added to the diagonal of covariance matrices for convergence (minimum value) ...
Definition: xmmHmmParameters.hpp:160
static T defaultLimitMax()
Attribute default maximum value.
Definition: xmmAttribute.hpp:241