C++ API Reference for Intel® Data Analytics Acceleration Library 2019 Update 4

decision_tree_classification_training_types.h
1 /* file: decision_tree_classification_training_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2019 Intel Corporation.
4 *
5 * This software and the related documents are Intel copyrighted materials, and
6 * your use of them is governed by the express license under which they were
7 * provided to you (License). Unless the License provides otherwise, you may not
8 * use, modify, copy, publish, distribute, disclose or transmit this software or
9 * the related documents without Intel's prior written permission.
10 *
11 * This software and the related documents are provided as is, with no express
12 * or implied warranties, other than those that are expressly stated in the
13 * License.
14 *******************************************************************************/
15 
16 /*
17 //++
18 // Implementation of the Decision tree algorithm interface
19 //--
20 */
21 
22 #ifndef __DECISION_TREE_CLASSIFICATION_TRAINING_TYPES_H__
23 #define __DECISION_TREE_CLASSIFICATION_TRAINING_TYPES_H__
24 
25 #include "algorithms/algorithm.h"
26 #include "data_management/data/data_serialize.h"
27 #include "algorithms/decision_tree/decision_tree_classification_model.h"
28 #include "algorithms/classifier/classifier_training_types.h"
29 
30 namespace daal
31 {
32 namespace algorithms
33 {
34 
38 namespace decision_tree
39 {
40 
44 namespace classification
45 {
46 
56 namespace training
57 {
58 
63 enum Method
64 {
65  defaultDense = 0
66 };
67 
72 enum InputId
73 {
74  dataForPruning = algorithms::classifier::training::lastInputId + 1,
75  labelsForPruning,
76  lastInputId = labelsForPruning
77 };
78 
82 namespace interface1
83 {
84 
89 class DAAL_EXPORT Input : public classifier::training::Input
90 {
91 public:
92  Input();
93  Input(const Input& other) : classifier::training::Input(other){}
94 
95  using classifier::training::Input::get;
96  using classifier::training::Input::set;
97 
103  data_management::NumericTablePtr get(decision_tree::classification::training::InputId id) const;
104 
110  void set(decision_tree::classification::training::InputId id, const data_management::NumericTablePtr & value);
111 
117  services::Status check(const daal::algorithms::Parameter * parameter, int method) const DAAL_C11_OVERRIDE;
118 
119 protected:
120  services::Status checkImpl(const daal::algorithms::Parameter * parameter) const;
121 };
122 
123 typedef services::SharedPtr<Input> InputPtr;
124 typedef services::SharedPtr<const Input> InputConstPtr;
125 
130 class DAAL_EXPORT Result : public classifier::training::Result
131 {
132 public:
133  DECLARE_SERIALIZABLE_CAST(Result);
134  Result();
135 
141  ModelPtr get(classifier::training::ResultId id) const;
142 
149  template<typename algorithmFPType>
150  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input * input, const Parameter * parameter, int method);
151 
152 protected:
154  template<typename Archive, bool onDeserialize>
155  services::Status serialImpl(Archive * arch)
156  {
157  return classifier::training::Result::serialImpl<Archive, onDeserialize>(arch);
158  }
159 };
160 
161 typedef services::SharedPtr<Result> ResultPtr;
162 typedef services::SharedPtr<const Result> ResultConstPtr;
163 
164 } // namespace interface1
165 
166 using interface1::Input;
167 using interface1::InputPtr;
168 using interface1::InputConstPtr;
169 using interface1::Result;
170 using interface1::ResultPtr;
171 using interface1::ResultConstPtr;
172 
173 } // namespace training
175 } // namespace classification
176 } // namespace decision_tree
177 } // namespace algorithms
178 } // namespace daal
179 
180 #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:130
daal
Definition: algorithm_base_common.h:31
daal::algorithms::decision_tree::classification::training::labelsForPruning
Definition: decision_tree_classification_training_types.h:75
daal::algorithms::decision_tree::classification::training::Method
Method
Computation methods for Decision tree model-based training.
Definition: decision_tree_classification_training_types.h:63
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:89
daal::algorithms::decision_tree::classification::training::InputId
InputId
Definition: decision_tree_classification_training_types.h:72
daal::algorithms::classifier::training::ResultId
ResultId
Definition: classifier_training_types.h:80
daal::algorithms::math::abs::value
Definition: abs_types.h:86
daal::algorithms::decision_tree::classification::training::defaultDense
Definition: decision_tree_classification_training_types.h:65
daal::algorithms::decision_tree::classification::training::dataForPruning
Definition: decision_tree_classification_training_types.h:74

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