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

decision_tree_classification_training_types.h
1 /* file: decision_tree_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 the Decision tree algorithm interface
21 //--
22 */
23 
24 #ifndef __DECISION_TREE_CLASSIFICATION_TRAINING_TYPES_H__
25 #define __DECISION_TREE_CLASSIFICATION_TRAINING_TYPES_H__
26 
27 #include "algorithms/algorithm.h"
28 #include "data_management/data/data_serialize.h"
29 #include "algorithms/decision_tree/decision_tree_classification_model.h"
30 #include "algorithms/classifier/classifier_training_types.h"
31 
32 namespace daal
33 {
34 namespace algorithms
35 {
36 
40 namespace decision_tree
41 {
42 
46 namespace classification
47 {
48 
58 namespace training
59 {
60 
65 enum Method
66 {
67  defaultDense = 0
68 };
69 
74 enum InputId
75 {
76  dataForPruning = algorithms::classifier::training::lastInputId + 1,
77  labelsForPruning,
78  lastInputId = labelsForPruning
79 };
80 
84 namespace interface1
85 {
86 
91 class DAAL_EXPORT Input : public classifier::training::Input
92 {
93 public:
94  Input();
95  Input(const Input& other) : classifier::training::Input(other){}
96 
97  using classifier::training::Input::get;
98  using classifier::training::Input::set;
99 
105  data_management::NumericTablePtr get(decision_tree::classification::training::InputId id) const;
106 
112  void set(decision_tree::classification::training::InputId id, const data_management::NumericTablePtr & value);
113 
119  services::Status check(const daal::algorithms::Parameter * parameter, int method) const DAAL_C11_OVERRIDE;
120 
121 protected:
122  services::Status checkImpl(const daal::algorithms::Parameter * parameter) const;
123 };
124 
125 typedef services::SharedPtr<Input> InputPtr;
126 typedef services::SharedPtr<const Input> InputConstPtr;
127 
132 class DAAL_EXPORT Result : public classifier::training::Result
133 {
134 public:
135  DECLARE_SERIALIZABLE_CAST(Result);
136  Result();
137 
143  ModelPtr get(classifier::training::ResultId id) const;
144 
151  template<typename algorithmFPType>
152  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input * input, const decision_tree::classification::Parameter * parameter, int method);
153 
160  template<typename algorithmFPType>
161  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input * input, const decision_tree::classification::interface1::Parameter * parameter, int method);
162 protected:
164  template<typename Archive, bool onDeserialize>
165  services::Status serialImpl(Archive * arch)
166  {
167  return classifier::training::Result::serialImpl<Archive, onDeserialize>(arch);
168  }
169 };
170 
171 typedef services::SharedPtr<Result> ResultPtr;
172 typedef services::SharedPtr<const Result> ResultConstPtr;
173 
174 } // namespace interface1
175 
176 using interface1::Input;
177 using interface1::InputPtr;
178 using interface1::InputConstPtr;
179 using interface1::Result;
180 using interface1::ResultPtr;
181 using interface1::ResultConstPtr;
182 
183 } // namespace training
185 } // namespace classification
186 } // namespace decision_tree
187 } // namespace algorithms
188 } // namespace daal
189 
190 #endif
daal::algorithms::decision_tree::classification::training::interface1::Result
Provides methods to access the result obtained with the compute() method of Decision tree model-based...
Definition: decision_tree_classification_training_types.h:132
daal::algorithms::decision_tree::classification::training::labelsForPruning
Definition: decision_tree_classification_training_types.h:77
daal::algorithms::decision_tree::classification::training::InputId
InputId
Definition: decision_tree_classification_training_types.h:74
daal::algorithms::decision_tree::classification::interface1::Parameter
Decision tree algorithm parameters.
Definition: decision_tree_classification_model.h:84
daal::algorithms::decision_tree::classification::training::Method
Method
Computation methods for Decision tree model-based training.
Definition: decision_tree_classification_training_types.h:65
daal::algorithms::decision_tree::classification::training::dataForPruning
Definition: decision_tree_classification_training_types.h:76
daal::algorithms::decision_tree::classification::training::defaultDense
Definition: decision_tree_classification_training_types.h:67
daal::algorithms::math::abs::value
Definition: abs_types.h:88
daal::algorithms::decision_tree::classification::training::interface1::Input
Base class for the input objects in the training stage of the classification algorithms.
Definition: decision_tree_classification_training_types.h:91
daal::algorithms::classifier::training::ResultId
ResultId
Definition: classifier_training_types.h:82

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