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

adaboost_training_types.h
1 /* file: adaboost_training_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 // Implementation of Ada Boost training algorithm interface.
21 //--
22 */
23 
24 #ifndef __ADA_BOOST_TRAINING_TYPES_H__
25 #define __ADA_BOOST_TRAINING_TYPES_H__
26 
27 #include "algorithms/algorithm.h"
28 #include "algorithms/classifier/classifier_training_types.h"
29 #include "algorithms/boosting/adaboost_model.h"
30 
31 namespace daal
32 {
33 namespace algorithms
34 {
40 namespace adaboost
41 {
51 namespace training
52 {
57 enum Method
58 {
59  defaultDense = 0,
60  samme = defaultDense,
61  sammeR = 1
62 };
63 
68 enum ResultNumericTableId
69 {
70  weakLearnersErrors = classifier::training::model + 1,
72  lastResultNumericTableId = weakLearnersErrors
73 };
77 namespace interface1
78 {
84 class DAAL_EXPORT Result : public classifier::training::interface1::Result
85 {
86 public:
87  DECLARE_SERIALIZABLE_CAST(Result);
88 
89  DAAL_DEPRECATED_VIRTUAL virtual ~Result() {}
90 
97  template <typename algorithmFPType>
98  DAAL_EXPORT DAAL_DEPRECATED services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, const int method);
99 
105  DAAL_DEPRECATED daal::algorithms::adaboost::interface1::ModelPtr get(classifier::training::ResultId id) const;
106 
107  DAAL_DEPRECATED services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, int method) const DAAL_C11_OVERRIDE;
108 
109 protected:
111  template<typename Archive, bool onDeserialize>
112  services::Status serialImpl(Archive *arch)
113  {
114  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
115  }
116 };
117 typedef services::SharedPtr<interface1::Result> ResultPtr;
118 } // namespace interface1
119 
123 namespace interface2
124 {
130 class DAAL_EXPORT Result : public classifier::training::Result
131 {
132 public:
133  DECLARE_SERIALIZABLE_CAST(Result);
134 
135  Result();
136  virtual ~Result() {}
137 
144  template <typename algorithmFPType>
145  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, const int method);
146 
152  ModelPtr get(classifier::training::ResultId id) const;
153 
159  void set(classifier::training::ResultId id, const ModelPtr &value);
160 
166  data_management::NumericTablePtr get(ResultNumericTableId id) const;
167 
173  void set(ResultNumericTableId id, const data_management::NumericTablePtr &value);
174 
175  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, int method) const DAAL_C11_OVERRIDE;
176 
177 protected:
179  template<typename Archive, bool onDeserialize>
180  services::Status serialImpl(Archive *arch)
181  {
182  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
183  }
184 };
185 typedef services::SharedPtr<Result> ResultPtr;
186 } // namespace interface2
187 using interface2::Result;
188 using interface2::ResultPtr;
189 
190 } // namespace daal::algorithms::adaboost::training
192 }
193 }
194 } // namespace daal
195 #endif // __ADA_BOOST_TRAINING_TYPES_H__
daal::algorithms::classifier::training::interface1::Result
Provides methods to access final results obtained with the compute() method in the batch processing m...
Definition: classifier_training_types.h:198
daal::algorithms::adaboost::training::Method
Method
Definition: adaboost_training_types.h:57
daal::algorithms::adaboost::training::interface1::Result
Provides methods to access final results obtained with the compute() method.
Definition: adaboost_training_types.h:84
daal::algorithms::adaboost::training::weakLearnersErrors
Definition: adaboost_training_types.h:70
daal::algorithms::adaboost::training::interface2::Result
Provides methods to access final results obtained with the compute() method of the AdaBoost training ...
Definition: adaboost_training_types.h:130
daal::algorithms::adaboost::training::sammeR
Definition: adaboost_training_types.h:61
daal::algorithms::adaboost::training::ResultNumericTableId
ResultNumericTableId
Available identifiers of the result of AdaBoost model-based training.
Definition: adaboost_training_types.h:68
daal::algorithms::classifier::training::model
Definition: classifier_training_types.h:84
daal::algorithms::math::abs::value
Definition: abs_types.h:88
daal::algorithms::classifier::training::ResultId
ResultId
Definition: classifier_training_types.h:82
daal::algorithms::adaboost::training::samme
Definition: adaboost_training_types.h:60
daal::algorithms::adaboost::training::defaultDense
Definition: adaboost_training_types.h:59

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