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

regression_training_batch.h
1 /* file: regression_training_batch.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 for the regression model-based training
21 // in the batch processing mode
22 //--
23 */
24 
25 #ifndef __REGRESSION_TRAINING_BATCH_H__
26 #define __REGRESSION_TRAINING_BATCH_H__
27 
28 #include "algorithms/algorithm.h"
29 #include "algorithms/regression/regression_training_types.h"
30 
31 namespace daal
32 {
33 namespace algorithms
34 {
35 namespace regression
36 {
37 namespace training
38 {
39 namespace interface1
40 {
54 class DAAL_EXPORT Batch : public Training<batch>
55 {
56 public:
57  typedef algorithms::regression::training::Input InputType;
58  typedef algorithms::regression::training::Result ResultType;
59 
60  virtual ~Batch() {}
65  virtual InputType* getInput() = 0;
66 
73  services::Status setResult(const ResultPtr& res)
74  {
75  DAAL_CHECK(res, services::ErrorNullResult)
76  _result = res;
77  _res = _result.get();
78  return services::Status();
79  }
80 
81  /* Resets the results of the regression model-based training
82  * \return Status of the operation
83  */
84  virtual services::Status resetResult() = 0;
85 
91  services::SharedPtr<Batch> clone() const
92  {
93  return services::SharedPtr<Batch>(cloneImpl());
94  }
95 
100  ResultPtr getResult() { return _result; }
101 
102 protected:
103  virtual Batch * cloneImpl() const DAAL_C11_OVERRIDE = 0;
104  ResultPtr _result;
105 };
107 }
108 using interface1::Batch;
109 }
110 }
111 }
112 }
113 #endif
daal::algorithms::regression::training::interface1::Batch
Provides methods for the regression model-based training in the batch processing mode.
Definition: regression_training_batch.h:54
daal::services::ErrorNullResult
Definition: error_indexes.h:98
daal::algorithms::Training
Provides methods to train models that depend on the data provided. For example, these methods enable ...
Definition: training.h:62
daal::algorithms::regression::training::interface1::Batch::clone
services::SharedPtr< Batch > clone() const
Definition: regression_training_batch.h:91
daal::algorithms::regression::training::interface1::Batch::getResult
ResultPtr getResult()
Definition: regression_training_batch.h:100
daal::algorithms::regression::training::interface1::Batch::setResult
services::Status setResult(const ResultPtr &res)
Definition: regression_training_batch.h:73

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