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

decision_forest_classification_training_types.h
1 /* file: decision_forest_classification_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 decision forest classification training algorithm interface.
21 //--
22 */
23 
24 #ifndef __DECISION_FOREST_CLASSIFICATION_TRAINING_TYPES_H__
25 #define __DECISION_FOREST_CLASSIFICATION_TRAINING_TYPES_H__
26 
27 #include "algorithms/algorithm.h"
28 #include "algorithms/classifier/classifier_training_types.h"
29 #include "algorithms/decision_forest/decision_forest_classification_model.h"
30 #include "algorithms/decision_forest/decision_forest_training_parameter.h"
31 
32 namespace daal
33 {
34 namespace algorithms
35 {
36 namespace decision_forest
37 {
38 namespace classification
39 {
49 namespace training
50 {
55 enum Method
56 {
57  defaultDense = 0
58 };
59 
64 enum ResultNumericTableId
65 {
66  outOfBagError = classifier::training::model + 1,
68  variableImportance,
70  outOfBagErrorPerObservation,
72  lastResultId = outOfBagErrorPerObservation
73 };
74 
79 enum ResultEngineId
80 {
81  updatedEngine = lastResultId + 1,
82  lastResultEngineId = updatedEngine
83 };
84 
88 namespace interface1
89 {
96 /* [interface1::Parameter source code] */
97 struct DAAL_EXPORT Parameter : public classifier::interface1::Parameter, public daal::algorithms::decision_forest::training::Parameter
98 {
100  DAAL_DEPRECATED Parameter(size_t nClasses) : classifier::interface1::Parameter(nClasses) {}
101  DAAL_DEPRECATED services::Status check() const DAAL_C11_OVERRIDE;
102 };
103 /* [interface1::Parameter source code] */
104 }
105 
109 namespace interface2
110 {
117 /* [Parameter source code] */
118 struct DAAL_EXPORT Parameter : public classifier::Parameter, public daal::algorithms::decision_forest::training::Parameter
119 {
121  Parameter(size_t nClasses) : classifier::Parameter(nClasses) {}
122  services::Status check() const DAAL_C11_OVERRIDE;
123 };
124 /* [Parameter source code] */
125 }
126 
127 namespace interface1
128 {
134 class DAAL_EXPORT Result : public classifier::training::Result
135 {
136 public:
137  DECLARE_SERIALIZABLE_CAST(Result);
138 
139  Result();
140  virtual ~Result();
141 
147  ModelPtr get(classifier::training::ResultId id) const;
148 
154  void set(classifier::training::ResultId id, const ModelPtr &value);
155 
161  data_management::NumericTablePtr get(ResultNumericTableId id) const;
162 
168  void set(ResultNumericTableId id, const data_management::NumericTablePtr &value);
169 
177  template <typename algorithmFPType>
178  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, const int method);
179 
187  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
188 
194  engines::EnginePtr get(ResultEngineId id) const;
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 public:
205  class ResultImpl;
206 
207  ResultImpl* impl() { return _impl; }
208 
209  Result( const Result& other );
210 
211 private:
212  ResultImpl* _impl;
213 };
214 typedef services::SharedPtr<Result> ResultPtr;
215 
216 } // namespace interface1
217 using interface2::Parameter;
218 using interface1::Result;
219 using interface1::ResultPtr;
220 
221 } // namespace daal::algorithms::decision_forest::classification::training
223 }
224 }
225 }
226 } // namespace daal
227 #endif // __DECISION_FOREST_CLASSIFICATION_TRAINING_TYPES_H__
daal::algorithms::decision_forest::classification::training::outOfBagErrorPerObservation
Definition: decision_forest_classification_training_types.h:70
daal::algorithms::decision_forest::classification::training::defaultDense
Definition: decision_forest_classification_training_types.h:57
daal::algorithms::decision_forest::classification::training::outOfBagError
Definition: decision_forest_classification_training_types.h:66
daal::algorithms::decision_forest::classification::training::interface2::Parameter::Parameter
Parameter(size_t nClasses)
Definition: decision_forest_classification_training_types.h:121
daal::algorithms::decision_forest::classification::training::ResultEngineId
ResultEngineId
Available identifiers of the result of decision forest model-based training.
Definition: decision_forest_classification_training_types.h:79
daal::algorithms::decision_forest::classification::training::Method
Method
Computation methods for decision forest classification model-based training.
Definition: decision_forest_classification_training_types.h:55
daal::algorithms::decision_forest::classification::training::ResultNumericTableId
ResultNumericTableId
Available identifiers of the result of decision forest model-based training.
Definition: decision_forest_classification_training_types.h:64
daal::algorithms::decision_forest::classification::training::interface1::Result
Provides methods to access final results obtained with the compute() method of the LogitBoost trainin...
Definition: decision_forest_classification_training_types.h:134
daal::algorithms::decision_forest::classification::training::interface2::Parameter
Decision forest algorithm parameters.
Definition: decision_forest_classification_training_types.h:118
daal::algorithms::decision_forest::classification::training::interface1::Parameter::Parameter
DAAL_DEPRECATED Parameter(size_t nClasses)
Definition: decision_forest_classification_training_types.h:100
daal::algorithms::classifier::interface1::Parameter
Base class for the parameters of the classification algorithm.
Definition: classifier_model.h:69
daal::algorithms::decision_forest::classification::training::variableImportance
Definition: decision_forest_classification_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::decision_forest::classification::training::interface1::Parameter
Decision forest algorithm parameters.
Definition: decision_forest_classification_training_types.h:97
daal::algorithms::classifier::training::ResultId
ResultId
Definition: classifier_training_types.h:82
daal::algorithms::decision_forest::classification::training::updatedEngine
Definition: decision_forest_classification_training_types.h:81

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