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

decision_forest_classification_predict_types.h
1 /* file: decision_forest_classification_predict_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 base classes used in the prediction stage
21 // of the classifier algorithm
22 //--
23 */
24 
25 #ifndef __DECISION_FOREST_CLASSIFICATION_PREDICT_TYPES_H__
26 #define __DECISION_FOREST_CLASSIFICATION_PREDICT_TYPES_H__
27 
28 #include "algorithms/algorithm.h"
29 #include "algorithms/decision_forest/decision_forest_classification_model.h"
30 #include "algorithms/classifier/classifier_predict_types.h"
31 
32 namespace daal
33 {
34 namespace algorithms
35 {
36 namespace decision_forest
37 {
38 namespace classification
39 {
48 namespace prediction
49 {
50 
55 enum VotingMethod
56 {
57  weighted = 0,
58  unweighted,
59  lastResultId = unweighted
60 };
64 namespace interface1
65 {
66 
71 class DAAL_EXPORT Input : public classifier::prediction::Input
72 {
73  typedef classifier::prediction::Input super;
74 public:
75  Input();
76  Input(const Input& other) : super(other){}
77  virtual ~Input() {}
78 
79  using super::get;
80  using super::set;
81 
87  data_management::NumericTablePtr get(classifier::prediction::NumericTableInputId id) const;
88 
94  decision_forest::classification::ModelPtr get(classifier::prediction::ModelInputId id) const;
95 
101  void set(classifier::prediction::NumericTableInputId id, const data_management::NumericTablePtr &ptr);
102 
108  void set(classifier::prediction::ModelInputId id, const decision_forest::classification::ModelPtr &ptr);
109 
116  services::Status check(const daal::algorithms::Parameter *parameter, int method) const DAAL_C11_OVERRIDE;
117 };
118 
125 /* [Parameter source code] */
126 struct DAAL_EXPORT Parameter : public daal::algorithms::classifier::Parameter
127 {
128  Parameter(size_t nClasses, VotingMethod votingMethod = weighted) :
129  daal::algorithms::classifier::Parameter(nClasses),
130  votingMethod(votingMethod) {}
131  VotingMethod votingMethod;
132  services::Status check() const DAAL_C11_OVERRIDE;
133 };
134 /* [Parameter source code] */
135 
136 } // namespace interface1
137 using interface1::Input;
138 using interface1::Parameter;
139 } // namespace prediction
141 }
142 }
143 }
144 }
145 #endif // __DECISION_FOREST_CLASSIFICATION_PREDICT_TYPES_H__
daal::algorithms::decision_forest::classification::prediction::interface1::Input
Input objects in the prediction stage of the DECISION_FOREST_CLASSIFICATION algorithm.
Definition: decision_forest_classification_predict_types.h:71
daal::algorithms::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:55
daal::algorithms::decision_forest::classification::prediction::interface1::Parameter
Class for the parameters of the Decision Forest classification algorithm.
Definition: decision_forest_classification_predict_types.h:126
daal::algorithms::classifier::prediction::NumericTableInputId
NumericTableInputId
Definition: classifier_predict_types.h:55
daal::algorithms::classifier::prediction::ModelInputId
ModelInputId
Definition: classifier_predict_types.h:66
daal::algorithms::decision_forest::classification::prediction::VotingMethod
VotingMethod
Available methods for averaging trees predictions.
Definition: decision_forest_classification_predict_types.h:55

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