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

gbt_classification_training_types.h
1 /* file: gbt_classification_training_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2018 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 gradient boosted trees classification training algorithm interface.
19 //--
20 */
21 
22 #ifndef __GBT_CLASSIFICATION_TRAINING_TYPES_H__
23 #define __GBT_CLASSIFICATION_TRAINING_TYPES_H__
24 
25 #include "algorithms/algorithm.h"
26 #include "algorithms/classifier/classifier_training_types.h"
27 #include "algorithms/gradient_boosted_trees/gbt_classification_model.h"
28 #include "algorithms/gradient_boosted_trees/gbt_training_parameter.h"
29 
30 namespace daal
31 {
32 namespace algorithms
33 {
34 namespace gbt
35 {
36 namespace classification
37 {
47 namespace training
48 {
53 enum Method
54 {
55  xboost = 0,
57  defaultDense = 0
58 };
59 
64 enum LossFunctionType
65 {
66  crossEntropy, /* Multinomial deviance */
67  custom /* custom function type */
68 };
69 
73 namespace interface1
74 {
81 /* [Parameter source code] */
82 struct DAAL_EXPORT Parameter : public classifier::Parameter, public daal::algorithms::gbt::training::Parameter
83 {
85  Parameter(size_t nClasses) : classifier::Parameter(nClasses), loss(crossEntropy) {}
86  services::Status check() const DAAL_C11_OVERRIDE;
87  LossFunctionType loss; /* Defaut is crossEntropy */
88 };
89 /* [Parameter source code] */
90 
91 
97 class DAAL_EXPORT Result : public classifier::training::Result
98 {
99 public:
100  DECLARE_SERIALIZABLE_CAST(Result);
101 
102  Result();
103  virtual ~Result() {}
104 
110  ModelPtr get(classifier::training::ResultId id) const;
111 
117  void set(classifier::training::ResultId id, const ModelPtr &value);
118 
126  template <typename algorithmFPType>
127  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, const int method);
128 
136  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
137 
138 protected:
140  template<typename Archive, bool onDeserialize>
141  services::Status serialImpl(Archive *arch)
142  {
143  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
144  }
145 };
146 typedef services::SharedPtr<Result> ResultPtr;
147 
148 } // namespace interface1
149 using interface1::Parameter;
150 using interface1::Result;
151 using interface1::ResultPtr;
152 
153 } // namespace daal::algorithms::gbt::classification::training
155 }
156 }
157 }
158 } // namespace daal
159 #endif // __GBT_CLASSIFICATION_TRAINING_TYPES_H__
daal::algorithms::gbt::classification::training::defaultDense
Definition: gbt_classification_training_types.h:57
daal::algorithms::gbt::classification::training::LossFunctionType
LossFunctionType
Loss function type.
Definition: gbt_classification_training_types.h:64
daal
Definition: algorithm_base_common.h:31
daal::algorithms::gbt::classification::training::Method
Method
Computation methods for gradient boosted trees classification model-based training.
Definition: gbt_classification_training_types.h:53
daal::algorithms::gbt::classification::training::xboost
Definition: gbt_classification_training_types.h:55
daal::algorithms::gbt::classification::training::interface1::Parameter::Parameter
Parameter(size_t nClasses)
Definition: gbt_classification_training_types.h:85
daal::algorithms::gbt::classification::training::interface1::Parameter
Gradient Boosted Trees algorithm parameters.
Definition: gbt_classification_training_types.h:82
daal::algorithms::classifier::training::ResultId
ResultId
Definition: classifier_training_types.h:80
daal::algorithms::math::abs::value
Definition: abs_types.h:86
daal::algorithms::gbt::classification::training::interface1::Result
Provides methods to access the result obtained with the compute() method of model-based training...
Definition: gbt_classification_training_types.h:97

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