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

outlier_detection_multivariate_types.h
1 /* file: outlier_detection_multivariate_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 // Outlier Detection algorithm parameter structure
45 //--
46 */
47 
48 #ifndef __OUTLIERDETECTION_MULTIVARIATE_TYPES_H__
49 #define __OUTLIERDETECTION_MULTIVARIATE_TYPES_H__
50 
51 #include "algorithms/algorithm.h"
52 #include "data_management/data/homogen_numeric_table.h"
53 
54 namespace daal
55 {
56 namespace algorithms
57 {
67 namespace multivariate_outlier_detection
68 {
73 enum Method
74 {
75  defaultDense = 0,
76  baconDense = 1
78 };
79 
85 enum BaconInitializationMethod
86 {
87  baconMedian = 0,
88  baconMahalanobis = 1
89 };
90 
95 enum InputId
96 {
97  data ,
98  location ,
99  scatter ,
100  threshold ,
101  lastInputId = threshold
102 };
103 
104 
109 enum ResultId
110 {
111  weights,
112  lastResultId = weights
113 };
114 
118 namespace interface1
119 {
124 struct InitIface
125 {
133  virtual void operator()(data_management::NumericTable *data,
134  data_management::NumericTable *location,
135  data_management::NumericTable *scatter,
136  data_management::NumericTable *threshold) = 0;
137 
138  virtual ~InitIface() {}
139 };
140 
145 struct DAAL_EXPORT DefaultInit : public InitIface
146 {
154  virtual void operator()(data_management::NumericTable *data,
155  data_management::NumericTable *location,
156  data_management::NumericTable *scatter,
157  data_management::NumericTable *threshold) {}
158 };
159 
163 template <Method method>
164 struct Parameter : public daal::algorithms::Parameter
165 {};
166 
173 /* [ParameterDefault source code] */
174 template <>
175 struct DAAL_EXPORT Parameter<defaultDense> : public daal::algorithms::Parameter
176 {
177  Parameter() {}
178  services::SharedPtr<InitIface> initializationProcedure;
180  virtual services::Status check() const DAAL_C11_OVERRIDE {return services::Status();}
181 };
182 /* [ParameterDefault source code] */
183 
191 /* [ParameterBacon source code] */
192 template <>
193 struct DAAL_EXPORT Parameter<baconDense> : public daal::algorithms::Parameter
194 {
195  Parameter(BaconInitializationMethod initMethod = baconMedian,
196  double alpha = 0.05, double toleranceToConverge = 0.005) {}
197 
198  BaconInitializationMethod initMethod;
199  double alpha;
202  double toleranceToConverge;
204  virtual services::Status check() const DAAL_C11_OVERRIDE {return services::Status();}
205 };
206 /* [ParameterBacon source code] */
207 
212 class DAAL_EXPORT Input : public daal::algorithms::Input
213 {
214 public:
215  Input();
216  Input(const Input& other);
217 
218  virtual ~Input() {}
219 
225  data_management::NumericTablePtr get(InputId id) const;
226 
232  void set(InputId id, const data_management::NumericTablePtr &ptr);
233 
241  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
242 };
243 
248 class DAAL_EXPORT Result : public daal::algorithms::Result
249 {
250 public:
251  DECLARE_SERIALIZABLE_CAST(Result);
252  Result();
253 
254  virtual ~Result() {};
255 
265  template <typename algorithmFPType>
266  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, const int method);
267 
273  data_management::NumericTablePtr get(ResultId id) const;
274 
280  void set(ResultId id, const data_management::NumericTablePtr &ptr);
281 
290  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
291 
292 protected:
294  template<typename Archive, bool onDeserialize>
295  services::Status serialImpl(Archive *arch)
296  {
297  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
298  }
299 };
300 typedef services::SharedPtr<Result> ResultPtr;
301 
303 } // namespace interface1
304 using interface1::InitIface;
305 using interface1::DefaultInit;
306 using interface1::Parameter;
307 using interface1::Input;
308 using interface1::Result;
309 using interface1::ResultPtr;
310 
311 } // namespace multivariate_outlier_detection
312 } // namespace algorithm
313 } // namespace daal
314 #endif
daal::algorithms::multivariate_outlier_detection::interface1::InitIface::operator()
virtual void operator()(data_management::NumericTable *data, data_management::NumericTable *location, data_management::NumericTable *scatter, data_management::NumericTable *threshold)=0
daal::algorithms::multivariate_outlier_detection::threshold
Definition: outlier_detection_multivariate_types.h:100
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::algorithms::multivariate_outlier_detection::ResultId
ResultId
Definition: outlier_detection_multivariate_types.h:109
daal
Definition: algorithm_base_common.h:57
daal::algorithms::multivariate_outlier_detection::interface1::Parameter< baconDense >::alpha
double alpha
Definition: outlier_detection_multivariate_types.h:199
daal::algorithms::multivariate_outlier_detection::Method
Method
Definition: outlier_detection_multivariate_types.h:73
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::multivariate_outlier_detection::baconMahalanobis
Definition: outlier_detection_multivariate_types.h:88
daal::algorithms::multivariate_outlier_detection::interface1::InitIface
Abstract interface class that provides function for the initialization procedure. ...
Definition: outlier_detection_multivariate_types.h:124
daal::algorithms::multivariate_outlier_detection::interface1::Parameter< baconDense >::initMethod
BaconInitializationMethod initMethod
Definition: outlier_detection_multivariate_types.h:198
daal::algorithms::multivariate_outlier_detection::interface1::Parameter< defaultDense >::initializationProcedure
services::SharedPtr< InitIface > initializationProcedure
Definition: outlier_detection_multivariate_types.h:178
daal::algorithms::multivariate_outlier_detection::interface1::Input
Input objects for the multivariate outlier detection algorithm
Definition: outlier_detection_multivariate_types.h:212
daal::algorithms::multivariate_outlier_detection::baconDense
Definition: outlier_detection_multivariate_types.h:76
daal::algorithms::multivariate_outlier_detection::location
Definition: outlier_detection_multivariate_types.h:98
daal::algorithms::multivariate_outlier_detection::interface1::Parameter
Definition: outlier_detection_multivariate_types.h:164
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::multivariate_outlier_detection::InputId
InputId
Definition: outlier_detection_multivariate_types.h:95
daal::data_management::interface1::NumericTable
Class for a data management component responsible for representation of data in the numeric format...
Definition: numeric_table.h:600
daal::algorithms::multivariate_outlier_detection::weights
Definition: outlier_detection_multivariate_types.h:111
daal::algorithms::multivariate_outlier_detection::interface1::DefaultInit
Class that specifies the default method for the initialization procedure.
Definition: outlier_detection_multivariate_types.h:145
daal::algorithms::multivariate_outlier_detection::interface1::DefaultInit::operator()
virtual void operator()(data_management::NumericTable *data, data_management::NumericTable *location, data_management::NumericTable *scatter, data_management::NumericTable *threshold)
Definition: outlier_detection_multivariate_types.h:154
daal::algorithms::multivariate_outlier_detection::baconMedian
Definition: outlier_detection_multivariate_types.h:87
daal::algorithms::multivariate_outlier_detection::defaultDense
Definition: outlier_detection_multivariate_types.h:75
daal::algorithms::multivariate_outlier_detection::data
Definition: outlier_detection_multivariate_types.h:97
daal::algorithms::interface1::Input
Base class to represent computation input arguments. Algorithm-specific input arguments are represent...
Definition: algorithm_types.h:217
daal::algorithms::multivariate_outlier_detection::scatter
Definition: outlier_detection_multivariate_types.h:99
daal::algorithms::multivariate_outlier_detection::interface1::Result
Results obtained with the compute() method of the multivariate outlier detection algorithm in the bat...
Definition: outlier_detection_multivariate_types.h:248
daal::algorithms::multivariate_outlier_detection::interface1::Parameter< baconDense >::toleranceToConverge
double toleranceToConverge
Definition: outlier_detection_multivariate_types.h:202
daal::algorithms::multivariate_outlier_detection::BaconInitializationMethod
BaconInitializationMethod
Definition: outlier_detection_multivariate_types.h:85

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