C++ API Reference for Intel® Data Analytics Acceleration Library 2019 Update 5

em_gmm_init_types.h
1 /* file: em_gmm_init_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2019 Intel Corporation.
4 *
5 * This software and the related documents are Intel copyrighted materials, and
6 * your use of them is governed by the express license under which they were
7 * provided to you (License). Unless the License provides otherwise, you may not
8 * use, modify, copy, publish, distribute, disclose or transmit this software or
9 * the related documents without Intel's prior written permission.
10 *
11 * This software and the related documents are provided as is, with no express
12 * or implied warranties, other than those that are expressly stated in the
13 * License.
14 *******************************************************************************/
15 
16 /*
17 //++
18 // Implementation of the EM for GMM initialization interface.
19 //--
20 */
21 
22 #ifndef __EM_GMM_INIT_TYPES_H__
23 #define __EM_GMM_INIT_TYPES_H__
24 
25 #include "algorithms/algorithm.h"
26 #include "data_management/data/numeric_table.h"
27 #include "data_management/data/homogen_numeric_table.h"
28 #include "services/daal_defines.h"
29 #include "em_gmm_covariance_storage_id.h"
30 #include "algorithms/engines/mt19937/mt19937.h"
31 
32 namespace daal
33 {
34 namespace algorithms
35 {
36 namespace em_gmm
37 {
38 
51 namespace init
52 {
57 enum InputId
58 {
59  data,
60  lastInputId = data
61 };
62 
67 enum ResultId
68 {
69  weights,
70  means,
71  lastResultId = means
72 };
73 
78 enum ResultCovariancesId
79 {
80  covariances = lastResultId + 1,
81  lastResultCovariancesId = covariances
82 };
83 
88 enum Method
89 {
90  defaultDense = 0
91 };
92 
93 
97 namespace interface1
98 {
105 /* [Parameter source code] */
106 
107 struct DAAL_EXPORT Parameter : public daal::algorithms::Parameter
108 {
118  Parameter(size_t nComponents, size_t nTrials = 20, size_t nIterations = 10, size_t seed = 777,
119  double accuracyThreshold = 1.0e-04, em_gmm::CovarianceStorageId covarianceStorage = em_gmm::full);
120 
121  virtual ~Parameter() {}
122 
126  virtual services::Status check() const;
127 
128  size_t nComponents;
129  size_t nTrials;
130  size_t nIterations;
131  size_t seed;
132  double accuracyThreshold;
133  em_gmm::CovarianceStorageId covarianceStorage;
134  engines::EnginePtr engine;
135 };
136 /* [Parameter source code] */
137 
142 class DAAL_EXPORT Input : public daal::algorithms::Input
143 {
144 public:
146  Input();
147 
149  Input(const Input& other) : daal::algorithms::Input(other){}
150 
151  virtual ~Input() {}
152 
158  void set(InputId id, const data_management::NumericTablePtr &ptr);
159 
165  data_management::NumericTablePtr get(InputId id) const;
166 
172  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
173 };
174 
179 class DAAL_EXPORT Result : public daal::algorithms::Result
180 {
181 public:
182  DECLARE_SERIALIZABLE_CAST(Result);
184  Result();
185 
186  virtual ~Result() {};
187 
194  template <typename algorithmFPType>
195  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, const int method);
196 
202  void set(ResultId id, const data_management::NumericTablePtr &ptr);
203 
209  void set(ResultCovariancesId id, const data_management::DataCollectionPtr &ptr);
210 
216  data_management::NumericTablePtr get(ResultId id) const;
217 
223  data_management::DataCollectionPtr get(ResultCovariancesId id) const;
224 
231  data_management::NumericTablePtr get(ResultCovariancesId id, size_t index) const;
232 
239  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
240 
241 protected:
243  template<typename Archive, bool onDeserialize>
244  services::Status serialImpl(Archive *arch)
245  {
246  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
247  }
248 };
249 typedef services::SharedPtr<daal::algorithms::em_gmm::init::interface1::Result> ResultPtr;
252 } // namespace interface1
253 using interface1::Parameter;
254 using interface1::Input;
255 using interface1::Result;
256 using interface1::ResultPtr;
257 
258 } // namespace init
259 } // namespace em_gmm
260 } // namespace algorithm
261 } // namespace daal
262 #endif
daal::algorithms::em_gmm::init::interface1::Parameter::accuracyThreshold
double accuracyThreshold
Definition: em_gmm_init_types.h:132
daal::algorithms::em_gmm::init::interface1::Input
Input objects for the computation of initial values for the EM for GMM algorithm
Definition: em_gmm_init_types.h:142
daal::algorithms::em_gmm::init::ResultCovariancesId
ResultCovariancesId
Definition: em_gmm_init_types.h:78
daal
Definition: algorithm_base_common.h:31
daal::algorithms::em_gmm::CovarianceStorageId
CovarianceStorageId
Definition: em_gmm_covariance_storage_id.h:40
daal::algorithms::em_gmm::init::covariances
Definition: em_gmm_init_types.h:80
daal::algorithms::em_gmm::init::interface1::Parameter::seed
size_t seed
Definition: em_gmm_init_types.h:131
daal::algorithms::em_gmm::nIterations
Definition: em_gmm_types.h:97
daal::algorithms::em_gmm::init::interface1::Parameter::covarianceStorage
em_gmm::CovarianceStorageId covarianceStorage
Definition: em_gmm_init_types.h:133
daal_defines.h
daal::algorithms::em_gmm::init::Method
Method
Definition: em_gmm_init_types.h:88
daal::algorithms::em_gmm::init::interface1::Input::Input
Input(const Input &other)
Definition: em_gmm_init_types.h:149
daal::algorithms::em_gmm::init::data
Definition: em_gmm_init_types.h:59
daal::algorithms::em_gmm::init::interface1::Parameter::nTrials
size_t nTrials
Definition: em_gmm_init_types.h:129
daal::algorithms::em_gmm::init::ResultId
ResultId
Definition: em_gmm_init_types.h:67
daal::algorithms::em_gmm::init::interface1::Parameter::nIterations
size_t nIterations
Definition: em_gmm_init_types.h:130
daal::algorithms::em_gmm::init::interface1::Result
Results obtained with the compute() method of the initialization of the EM for GMM algorithm in the b...
Definition: em_gmm_init_types.h:179
daal::algorithms::em_gmm::init::interface1::Parameter::nComponents
size_t nComponents
Definition: em_gmm_init_types.h:128
daal::algorithms::em_gmm::init::defaultDense
Definition: em_gmm_init_types.h:90
daal::algorithms::em_gmm::init::means
Definition: em_gmm_init_types.h:70
daal::algorithms::em_gmm::init::interface1::Parameter::engine
engines::EnginePtr engine
Definition: em_gmm_init_types.h:134
daal::algorithms::em_gmm::init::InputId
InputId
Definition: em_gmm_init_types.h:57
daal::algorithms::em_gmm::init::interface1::Parameter
Parameter for the computation of initial values for the EM for GMM algorithm
Definition: em_gmm_init_types.h:107
daal::algorithms::em_gmm::init::weights
Definition: em_gmm_init_types.h:69

For more complete information about compiler optimizations, see our Optimization Notice.