C++ API Reference for Intel® Data Analytics Acceleration Library 2018 Update 3

classifier_model.h
1 /* file: classifier_model.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 the class defining the model of the classification algorithm
19 //--
20 */
21 
22 #ifndef __CLASSIFIER_MODEL_H__
23 #define __CLASSIFIER_MODEL_H__
24 
25 #include "algorithms/algorithm.h"
26 
27 namespace daal
28 {
29 namespace algorithms
30 {
36 namespace classifier
37 {
38 
42 namespace interface1
43 {
54 /* [Parameter source code] */
55 struct DAAL_EXPORT Parameter : public daal::algorithms::Parameter
56 {
57  Parameter(size_t nClasses = 2) : nClasses(nClasses) {}
58 
59  size_t nClasses;
61  services::Status check() const DAAL_C11_OVERRIDE;
62 };
63 /* [Parameter source code] */
64 
69 class DAAL_EXPORT Model : public daal::algorithms::Model
70 {
71 public:
72  DAAL_CAST_OPERATOR(Model);
73 
74  virtual ~Model() {}
75 
81  virtual size_t getNFeatures() const { return getNumberOfFeatures(); }
82 
87  virtual size_t getNumberOfFeatures() const = 0;
88 
94  virtual void setNFeatures(size_t nFeatures) {}
95 };
97 typedef services::SharedPtr<Model> ModelPtr;
98 typedef services::SharedPtr<const Model> ModelConstPtr;
99 } // namespace interface1
100 using interface1::Parameter;
101 using interface1::Model;
102 using interface1::ModelPtr;
103 using interface1::ModelConstPtr;
104 
105 }
106 }
107 }
108 #endif
daal
Definition: algorithm_base_common.h:31
daal::algorithms::classifier::interface1::Parameter
Base class for the parameters of the classification algorithm.
Definition: classifier_model.h:55
daal::algorithms::classifier::interface1::Model::setNFeatures
virtual void setNFeatures(size_t nFeatures)
Definition: classifier_model.h:94
daal::algorithms::interface1::Parameter
Base class to represent computation parameters. Algorithm-specific parameters are represented as deri...
Definition: algorithm_types.h:60
daal::algorithms::classifier::interface1::Model
Base class for the model of the classification algorithm.
Definition: classifier_model.h:69
daal::algorithms::classifier::interface1::Model::getNFeatures
virtual size_t getNFeatures() const
Definition: classifier_model.h:81
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:52
daal::algorithms::classifier::interface1::Parameter::nClasses
size_t nClasses
Definition: classifier_model.h:59

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