C++ API Reference for Intel® Data Analytics Acceleration Library 2018 Update 2

pca_explained_variance_types.h
1 /* file: pca_explained_variance_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2018 Intel Corporation
4 * All Rights Reserved.
5 *
6 * If this software was obtained under the Intel Simplified Software License,
7 * the following terms apply:
8 *
9 * The source code, information and material ("Material") contained herein is
10 * owned by Intel Corporation or its suppliers or licensors, and title to such
11 * Material remains with Intel Corporation or its suppliers or licensors. The
12 * Material contains proprietary information of Intel or its suppliers and
13 * licensors. The Material is protected by worldwide copyright laws and treaty
14 * provisions. No part of the Material may be used, copied, reproduced,
15 * modified, published, uploaded, posted, transmitted, distributed or disclosed
16 * in any way without Intel's prior express written permission. No license under
17 * any patent, copyright or other intellectual property rights in the Material
18 * is granted to or conferred upon you, either expressly, by implication,
19 * inducement, estoppel or otherwise. Any license under such intellectual
20 * property rights must be express and approved by Intel in writing.
21 *
22 * Unless otherwise agreed by Intel in writing, you may not remove or alter this
23 * notice or any other notice embedded in Materials by Intel or Intel's
24 * suppliers or licensors in any way.
25 *
26 *
27 * If this software was obtained under the Apache License, Version 2.0 (the
28 * "License"), the following terms apply:
29 *
30 * You may not use this file except in compliance with the License. You may
31 * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
32 *
33 *
34 * Unless required by applicable law or agreed to in writing, software
35 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
36 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
37 *
38 * See the License for the specific language governing permissions and
39 * limitations under the License.
40 *******************************************************************************/
41 
42 /*
43 //++
44 // Interface for the linear regression algorithm quality metrics for a explained variance
45 //--
46 */
47 
48 #ifndef __PCA_QUALITY_METRIC_TYPES_H__
49 #define __PCA_QUALITY_METRIC_TYPES_H__
50 
51 #include "services/daal_shared_ptr.h"
52 #include "algorithms/algorithm.h"
53 #include "data_management/data/homogen_numeric_table.h"
54 
55 namespace daal
56 {
57 namespace algorithms
58 {
59 namespace pca
60 {
61 namespace quality_metric
62 {
69 namespace explained_variance
70 {
71 
76 enum Method
77 {
78  defaultDense = 0
79 };
80 
85 enum InputId
86 {
87  eigenvalues,
88  lastInputId = eigenvalues
89 };
90 
95 enum ResultId
96 {
97  explainedVariances,
98  explainedVariancesRatios,
99  noiseVariance,
100  lastResultId = noiseVariance
101 };
102 
106 namespace interface1
107 {
108 
115 /* [Parameter source code] */
116 struct DAAL_EXPORT Parameter: public daal::algorithms::Parameter
117 {
118  Parameter(size_t nFeatures, size_t nComponents);
119  virtual ~Parameter() {}
120 
121  size_t nFeatures;
122  size_t nComponents;
129  virtual services::Status check() const;
130 };
131 /* [Parameter source code] */
132 
137 class DAAL_EXPORT Input: public daal::algorithms::Input
138 {
139 public:
140  DAAL_CAST_OPERATOR(Input);
141  DAAL_DOWN_CAST_OPERATOR(Input, daal::algorithms::Input);
142 
144  Input();
145 
146  virtual ~Input() {}
147 
153  data_management::NumericTablePtr get(InputId id) const;
154 
160  void set(InputId id, const data_management::NumericTablePtr &value);
161 
169  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
170 };
171 typedef services::SharedPtr<Input> InputPtr;
172 
177 class DAAL_EXPORT Result: public daal::algorithms::Result
178 {
179 public:
180  DECLARE_SERIALIZABLE_CAST(Result);
181  DAAL_DOWN_CAST_OPERATOR(Result, daal::algorithms::Result);
182 
183  Result();
184 
190  data_management::NumericTablePtr get(ResultId id) const;
191 
197  void set(ResultId id, const data_management::NumericTablePtr &value);
198 
207  template <typename algorithmFPType>
208  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, const int method);
209 
218  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
219 
220 protected:
222  template<typename Archive, bool onDeserialize>
223  services::Status serialImpl(Archive *arch)
224  {
225  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
226  }
227 };
228 typedef services::SharedPtr<Result> ResultPtr;
229 
230 }
231 using interface1::Parameter;
232 using interface1::Result;
233 using interface1::ResultPtr;
234 using interface1::Input;
235 using interface1::InputPtr;
236 
237 }
239 }
240 }
241 }
242 }
243 
244 #endif // __PCA_QUALITY_METRIC_TYPES_H__
daal::algorithms::pca::quality_metric::explained_variance::Method
Method
Definition: pca_explained_variance_types.h:76
daal::services::interface1::Status
Class that holds the results of API calls. In case of API routine failure it contains the list of err...
Definition: error_handling.h:491
daal
Definition: algorithm_base_common.h:57
daal::algorithms::pca::quality_metric::explained_variance::explainedVariances
Definition: pca_explained_variance_types.h:97
daal::algorithms::interface1::Result
Base class to represent final results of the computation. Algorithm-specific final results are repres...
Definition: algorithm_types.h:331
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:95
daal::algorithms::pca::quality_metric::explained_variance::eigenvalues
Definition: pca_explained_variance_types.h:87
daal::algorithms::interface1::Parameter
Base class to represent computation parameters. Algorithm-specific parameters are represented as deri...
Definition: algorithm_types.h:86
daal::services::interface1::SharedPtr
Shared pointer that retains shared ownership of an object through a pointer. Several SharedPtr object...
Definition: daal_shared_ptr.h:187
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:116
daal::algorithms::pca::quality_metric::explained_variance::noiseVariance
Definition: pca_explained_variance_types.h:99
daal::algorithms::pca::quality_metric::explained_variance::interface1::Parameter::nComponents
size_t nComponents
Definition: pca_explained_variance_types.h:122
daal::algorithms::pca::quality_metric::explained_variance::explainedVariancesRatios
Definition: pca_explained_variance_types.h:98
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:85
daal::algorithms::pca::quality_metric::explained_variance::interface1::Input
Input objects for explained variance quality metrics
Definition: pca_explained_variance_types.h:137
daal::algorithms::math::abs::value
Definition: abs_types.h:112
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:177
daal::algorithms::pca::quality_metric::explained_variance::interface1::Parameter::nFeatures
size_t nFeatures
Definition: pca_explained_variance_types.h:121
daal::algorithms::interface1::Input
Base class to represent computation input arguments. Algorithm-specific input arguments are represent...
Definition: algorithm_types.h:217
daal::algorithms::pca::quality_metric::explained_variance::defaultDense
Definition: pca_explained_variance_types.h:78

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