C++ API Reference for Intel® Data Analytics Acceleration Library 2020 Update 1

pca_explained_variance_types.h
1 /* file: pca_explained_variance_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2020 Intel Corporation
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *******************************************************************************/
17 
18 /*
19 //++
20 // Interface for the PCA algorithm quality metrics for a explained variance
21 //--
22 */
23 
24 #ifndef __PCA_QUALITY_METRIC_TYPES_H__
25 #define __PCA_QUALITY_METRIC_TYPES_H__
26 
27 #include "services/daal_shared_ptr.h"
28 #include "algorithms/algorithm.h"
29 #include "data_management/data/homogen_numeric_table.h"
30 
31 namespace daal
32 {
33 namespace algorithms
34 {
35 namespace pca
36 {
37 namespace quality_metric
38 {
45 namespace explained_variance
46 {
47 
52 enum Method
53 {
54  defaultDense = 0
55 };
56 
61 enum InputId
62 {
63  eigenvalues,
64  lastInputId = eigenvalues
65 };
66 
71 enum ResultId
72 {
73  explainedVariances,
74  explainedVariancesRatios,
75  noiseVariance,
76  lastResultId = noiseVariance
77 };
78 
82 namespace interface1
83 {
84 
91 /* [Parameter source code] */
92 struct DAAL_EXPORT Parameter: public daal::algorithms::Parameter
93 {
94  Parameter(size_t nFeatures, size_t nComponents);
95  virtual ~Parameter() {}
96 
97  size_t nFeatures;
98  size_t nComponents;
105  virtual services::Status check() const;
106 };
107 /* [Parameter source code] */
108 
113 class DAAL_EXPORT Input: public daal::algorithms::Input
114 {
115 public:
116  DAAL_CAST_OPERATOR(Input);
117  DAAL_DOWN_CAST_OPERATOR(Input, daal::algorithms::Input);
118 
120  Input();
121 
122  virtual ~Input() {}
123 
129  data_management::NumericTablePtr get(InputId id) const;
130 
136  void set(InputId id, const data_management::NumericTablePtr &value);
137 
145  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
146 };
147 typedef services::SharedPtr<Input> InputPtr;
148 
153 class DAAL_EXPORT Result: public daal::algorithms::Result
154 {
155 public:
156  DECLARE_SERIALIZABLE_CAST(Result);
157  DAAL_DOWN_CAST_OPERATOR(Result, daal::algorithms::Result);
158 
159  Result();
160 
166  data_management::NumericTablePtr get(ResultId id) const;
167 
173  void set(ResultId id, const data_management::NumericTablePtr &value);
174 
183  template <typename algorithmFPType>
184  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, const int method);
185 
194  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
195 
196 protected:
198  template<typename Archive, bool onDeserialize>
199  services::Status serialImpl(Archive *arch)
200  {
201  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
202  }
203 };
204 typedef services::SharedPtr<Result> ResultPtr;
205 
206 }
207 using interface1::Parameter;
208 using interface1::Result;
209 using interface1::ResultPtr;
210 using interface1::Input;
211 using interface1::InputPtr;
212 
213 }
215 }
216 }
217 }
218 }
219 
220 #endif // __PCA_QUALITY_METRIC_TYPES_H__
daal::algorithms::pca::quality_metric::explained_variance::interface1::Parameter::nComponents
size_t nComponents
Definition: pca_explained_variance_types.h:98
daal::algorithms::pca::quality_metric::explained_variance::noiseVariance
Definition: pca_explained_variance_types.h:75
daal::algorithms::pca::quality_metric::explained_variance::ResultId
ResultId
Available identifiers of the result of explained variance quality metrics.
Definition: pca_explained_variance_types.h:71
daal::algorithms::pca::quality_metric::explained_variance::explainedVariances
Definition: pca_explained_variance_types.h:73
daal::algorithms::pca::quality_metric::explained_variance::interface1::Parameter
Parameters for the compute() method of explained variance quality metrics.
Definition: pca_explained_variance_types.h:92
daal::algorithms::pca::quality_metric::explained_variance::defaultDense
Definition: pca_explained_variance_types.h:54
daal::algorithms::pca::quality_metric::explained_variance::interface1::Parameter::nFeatures
size_t nFeatures
Definition: pca_explained_variance_types.h:97
daal::algorithms::pca::quality_metric::explained_variance::Method
Method
Definition: pca_explained_variance_types.h:52
daal::algorithms::pca::quality_metric::explained_variance::InputId
InputId
Available identifiers of input objects for a explained variance quality metrics.
Definition: pca_explained_variance_types.h:61
daal::algorithms::math::abs::value
Definition: abs_types.h:88
daal::algorithms::pca::quality_metric::explained_variance::explainedVariancesRatios
Definition: pca_explained_variance_types.h:74
daal::algorithms::pca::quality_metric::explained_variance::eigenvalues
Definition: pca_explained_variance_types.h:63
daal::algorithms::pca::quality_metric::explained_variance::interface1::Input
Input objects for explained variance quality metrics
Definition: pca_explained_variance_types.h:113
daal::algorithms::pca::quality_metric::explained_variance::interface1::Result
Provides interface for the result of linear regression quality metrics.
Definition: pca_explained_variance_types.h:153

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