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

classifier_training_batch.h
1 /* file: classifier_training_batch.h */
2 /*******************************************************************************
3 * Copyright 2014-2019 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 interface for the classifier model training algorithm.
19 //--
20 */
21 
22 #ifndef __CLASSIFIER_TRAINING_BATCH_H__
23 #define __CLASSIFIER_TRAINING_BATCH_H__
24 
25 #include "algorithms/algorithm.h"
26 #include "algorithms/classifier/classifier_training_types.h"
27 
28 namespace daal
29 {
30 namespace algorithms
31 {
32 namespace classifier
33 {
34 namespace training
35 {
36 
37 namespace interface1
38 {
56 class Batch : public Training<batch>
57 {
58 public:
59  typedef algorithms::classifier::training::Input InputType;
60  typedef algorithms::classifier::Parameter ParameterType;
61  typedef algorithms::classifier::training::Result ResultType;
62 
63  virtual ~Batch()
64  {}
65 
70  virtual InputType * getInput() = 0;
71 
76  services::Status setResult(const ResultPtr& res)
77  {
78  DAAL_CHECK(res, services::ErrorNullResult)
79  _result = res;
80  _res = _result.get();
81  return services::Status();
82  }
83 
88  ResultPtr getResult() { return _result; }
89 
94  virtual services::Status resetResult() = 0;
95 
101  services::SharedPtr<Batch> clone() const
102  {
103  return services::SharedPtr<Batch>(cloneImpl());
104  }
105 
106 protected:
107 
108  virtual Batch * cloneImpl() const DAAL_C11_OVERRIDE = 0;
109  ResultPtr _result;
110 };
112 } // namespace interface1
113 using interface1::Batch;
114 
115 }
116 }
117 }
118 }
119 #endif
daal
Definition: algorithm_base_common.h:31
daal::algorithms::classifier::training::interface1::Batch::setResult
services::Status setResult(const ResultPtr &res)
Definition: classifier_training_batch.h:76
daal::algorithms::classifier::training::interface1::Batch::resetResult
virtual services::Status resetResult()=0
daal::algorithms::classifier::training::interface1::Batch::clone
services::SharedPtr< Batch > clone() const
Definition: classifier_training_batch.h:101
daal::algorithms::classifier::training::interface1::Batch
Algorithm class for training the classifier model.
Definition: classifier_training_batch.h:56
daal::algorithms::classifier::training::interface1::Batch::getInput
virtual InputType * getInput()=0
daal::algorithms::classifier::training::interface1::Batch::getResult
ResultPtr getResult()
Definition: classifier_training_batch.h:88
daal::services::ErrorNullResult
Definition: error_indexes.h:96
daal::algorithms::Training
Provides methods to train models that depend on the data provided. For example, these methods enable ...
Definition: training.h:60

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