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

stump_training_types.h
1 /* file: stump_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 interface of the decision stump training algorithm.
21 //--
22 */
23 
24 #ifndef __STUMP_TRAINING_TYPES_H__
25 #define __STUMP_TRAINING_TYPES_H__
26 
27 #include "algorithms/algorithm.h"
28 #include "algorithms/classifier/classifier_training_types.h"
29 #include "algorithms/weak_learner/weak_learner_training_types.h"
30 #include "algorithms/stump/stump_model.h"
31 
32 namespace daal
33 {
34 namespace algorithms
35 {
39 namespace stump
40 {
50 namespace training
51 {
56 enum Method
57 {
58  defaultDense = 0
59 };
60 
64 namespace interface1
65 {
71 class DAAL_EXPORT Result : public daal::algorithms::weak_learner::training::Result
72 {
73 public:
74  DECLARE_SERIALIZABLE_CAST(Result);
75  Result();
76 
77  virtual ~Result() {}
78 
84  daal::algorithms::stump::ModelPtr get(classifier::training::ResultId id) const;
85 
91  void set(classifier::training::ResultId id, daal::algorithms::stump::ModelPtr &value);
92 
100  template <typename algorithmFPType>
101  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, const int method);
102 
109  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, int method) const DAAL_C11_OVERRIDE;
110 
111 protected:
113  template<typename Archive, bool onDeserialize>
114  services::Status serialImpl(Archive *arch)
115  {
116  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
117  }
118 };
119 typedef services::SharedPtr<Result> ResultPtr;
120 } // namespace interface1
121 using interface1::Result;
122 using interface1::ResultPtr;
123 
124 } // namespace daal::algorithms::stump::training
126 }
127 }
128 } // namespace daal
129 #endif // __STUMP_TRAINING_TYPES_H__
daal::algorithms::stump::training::Method
Method
Definition: stump_training_types.h:56
daal::algorithms::stump::training::interface1::Result
Provides methods to access final results obtained with the compute() method of the decision stump tra...
Definition: stump_training_types.h:71
daal::algorithms::math::abs::value
Definition: abs_types.h:88
daal::algorithms::classifier::training::ResultId
ResultId
Definition: classifier_training_types.h:82
daal::algorithms::stump::training::defaultDense
Definition: stump_training_types.h:58

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