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

classifier_model.h
1 /* file: classifier_model.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 class defining the model of the classification algorithm
21 //--
22 */
23 
24 #ifndef __CLASSIFIER_MODEL_H__
25 #define __CLASSIFIER_MODEL_H__
26 
27 #include "algorithms/algorithm.h"
28 
29 namespace daal
30 {
31 namespace algorithms
32 {
38 namespace classifier
39 {
40 
46 enum ResultToComputeId
47 {
48  computeClassLabels = 0x00000001ULL,
49  computeClassProbabilities = 0x00000002ULL,
50  computeClassLogProbabilities = 0x00000004ULL,
51 };
52 
56 namespace interface1
57 {
68 /* [interface1::Parameter source code] */
69 struct DAAL_EXPORT Parameter : public daal::algorithms::Parameter
70 {
71  Parameter(size_t nClasses = 2) : nClasses(nClasses) {}
72 
73  size_t nClasses;
75  services::Status check() const DAAL_C11_OVERRIDE;
76 };
77 /* [interface1::Parameter source code] */
78 }
82 namespace interface2
83 {
94 /* [Parameter source code] */
95 struct DAAL_EXPORT Parameter : public daal::algorithms::Parameter
96 {
97  Parameter(size_t nClasses = 2);
98 
99  size_t nClasses;
100  DAAL_UINT64 resultsToEvaluate;
101  services::Status check() const DAAL_C11_OVERRIDE;
102 };
103 /* [Parameter source code] */
105 } // namespace interface2
106 using interface2::Parameter;
107 
111 namespace interface1
112 {
121 class DAAL_EXPORT Model : public daal::algorithms::Model
122 {
123 public:
124  DAAL_CAST_OPERATOR(Model);
125 
126  virtual ~Model() {}
127 
133  virtual size_t getNFeatures() const { return getNumberOfFeatures(); }
134 
139  virtual size_t getNumberOfFeatures() const = 0;
140 
146  virtual void setNFeatures(size_t nFeatures) {}
147 };
149 typedef services::SharedPtr<Model> ModelPtr;
150 typedef services::SharedPtr<const Model> ModelConstPtr;
151 } // namespace interface1
152 using interface1::Model;
153 using interface1::ModelPtr;
154 using interface1::ModelConstPtr;
155 
156 }
157 }
158 }
159 #endif
daal::algorithms::interface1::Model
The base class for the classes that represent the models, such as linear_regression::Model or svm::Mo...
Definition: model.h:54
daal::algorithms::classifier::interface1::Model::getNFeatures
virtual size_t getNFeatures() const
Definition: classifier_model.h:133
daal::algorithms::classifier::computeClassProbabilities
Definition: classifier_model.h:49
daal::algorithms::classifier::interface2::Parameter::nClasses
size_t nClasses
Definition: classifier_model.h:99
daal::algorithms::classifier::computeClassLogProbabilities
Definition: classifier_model.h:50
daal::algorithms::classifier::ResultToComputeId
ResultToComputeId
Definition: classifier_model.h:46
daal::algorithms::classifier::interface1::Model
Base class for the model of the classification algorithm.
Definition: classifier_model.h:121
daal::algorithms::classifier::interface2::Parameter::resultsToEvaluate
DAAL_UINT64 resultsToEvaluate
Definition: classifier_model.h:100
daal::algorithms::classifier::interface1::Parameter
Base class for the parameters of the classification algorithm.
Definition: classifier_model.h:69
daal::algorithms::classifier::interface1::Model::setNFeatures
virtual void setNFeatures(size_t nFeatures)
Definition: classifier_model.h:146
daal::algorithms::classifier::interface1::Parameter::nClasses
size_t nClasses
Definition: classifier_model.h:73
daal::algorithms::classifier::computeClassLabels
Definition: classifier_model.h:48

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