XMM - Probabilistic Models for Motion Recognition and Mapping

xmmModelSharedParameters.hpp
Go to the documentation of this file.
1 /*
2  * xmmModelSharedParameters.hpp
3  *
4  * Shared Parameters class
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 xmmModelSharedParameters_h
34 #define xmmModelSharedParameters_h
35 
36 #include "../common/xmmEvents.hpp"
37 #include "../trainingset/xmmTrainingSet.hpp"
38 #include <mutex>
39 
40 namespace xmm {
53 class SharedParameters : public Writable {
54  public:
55  template <typename SingleClassModel, typename ModelType>
56  friend class Model;
58  friend class SingleClassGMM;
59  friend class SingleClassHMM;
60  friend class HierarchicalHMM;
61  friend class GMM;
62 
67 
73 
78  explicit SharedParameters(Json::Value const& root);
79 
85 
87 
93  virtual Json::Value toJson() const;
94 
100  virtual void fromJson(Json::Value const& root);
101 
103 
108 
113 
118 
123 
128 
136 
146 
151 
152  protected:
156  virtual void onAttributeChange(AttributeBase* attr_pointer);
157 };
158 }
159 
160 #endif
Attribute< std::vector< std::string > > column_names
labels of the columns of input/output data (e.g. descriptor names)
Definition: xmmModelSharedParameters.hpp:122
SharedParameters()
Default Constructor.
Definition: xmmModelSharedParameters.cpp:35
Shared Parameters for models with multiple classes.
Definition: xmmModelSharedParameters.hpp:53
Probabilistic machine learning model for multiclass recognition and regression.
Definition: xmmModel.hpp:52
virtual Json::Value toJson() const
Write the object to a JSON Structure.
Definition: xmmModelSharedParameters.cpp:121
Gaussian Mixture Model for Continuous Recognition and Regression (Multi-class)
Definition: xmmGmm.hpp:47
Attribute< unsigned int > em_algorithm_min_iterations
Minimum number of iterations of the EM algorithm.
Definition: xmmModelSharedParameters.hpp:127
Attribute< bool > bimodal
defines if the phrase is bimodal (true) or unimodal (false)
Definition: xmmModelSharedParameters.hpp:107
Base Class for Generic Attributes.
Definition: xmmAttribute.hpp:105
Single-Class Hidden Markov Model.
Definition: xmmHmmSingleClass.hpp:47
Generic Template for Machine Learning Probabilistic models based on the EM algorithm.
Definition: xmmModelSingleClass.hpp:174
SharedParameters & operator=(SharedParameters const &src)
Assignment.
Definition: xmmModelSharedParameters.cpp:106
Abstract class for handling JSON + File I/O.
Definition: xmmJson.hpp:50
Attribute< unsigned int > dimension
total dimension of the training data
Definition: xmmModelSharedParameters.hpp:112
virtual void onAttributeChange(AttributeBase *attr_pointer)
notification function called when a member attribute is changed
Definition: xmmModelSharedParameters.cpp:144
Hierarchical Hidden Markov Model for Continuous Recognition and Regression (Multi-class) ...
Definition: xmmHierarchicalHmm.hpp:47
Definition: xmmAttribute.hpp:42
Attribute< unsigned int > dimension_input
Dimension of the input modality.
Definition: xmmModelSharedParameters.hpp:117
Single-Class Gaussian Mixture Model.
Definition: xmmGmmSingleClass.hpp:52
virtual void fromJson(Json::Value const &root)
Read the object from a JSON Structure.
Definition: xmmModelSharedParameters.cpp:135
Attribute< double > em_algorithm_percent_chg
log-likelihood difference threshold necessary to stop the EM algorithm.
Definition: xmmModelSharedParameters.hpp:145
Attribute< unsigned int > likelihood_window
Size of the window (in samples) used to compute the likelihoods.
Definition: xmmModelSharedParameters.hpp:150
Attribute< unsigned int > em_algorithm_max_iterations
Maximum number of iterations of the EM algorithm.
Definition: xmmModelSharedParameters.hpp:135