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

regression_training_online.h
1 /* file: regression_training_online.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 linear regression model-based training
21 // in the online processing mode
22 //--
23 */
24 
25 #ifndef __REGRESSION_TRAINING_ONLINE_H__
26 #define __REGRESSION_TRAINING_ONLINE_H__
27 
28 #include "algorithms/regression/regression_training_types.h"
29 
30 namespace daal
31 {
32 namespace algorithms
33 {
34 namespace regression
35 {
36 namespace training
37 {
38 
39 namespace interface1
40 {
55 class DAAL_EXPORT Online : public Training<online>
56 {
57 public:
58  typedef algorithms::regression::training::Input InputType;
59  typedef algorithms::regression::training::Result ResultType;
60  typedef algorithms::regression::training::PartialResult PartialResultType;
61 
62  virtual ~Online() {}
63  virtual InputType* getInput() = 0;
64 
71  services::Status setPartialResult(const PartialResultPtr& partialResult)
72  {
73  _partialResult = partialResult;
74  _pres = _partialResult.get();
75  return services::Status();
76  }
77 
84  services::Status setResult(const ResultPtr& res)
85  {
86  DAAL_CHECK(res, services::ErrorNullResult)
87  _result = res;
88  _res = _result.get();
89  return services::Status();
90  }
91 
96  PartialResultPtr getPartialResult() { return _partialResult; }
97 
102  ResultPtr getResult() { return _result; }
103 
104 protected:
105  PartialResultPtr _partialResult;
106  ResultPtr _result;
107 }; // class : public Online
109 } // namespace interface1
110 using interface1::Online;
111 
112 }
113 }
114 }
115 }
116 #endif
daal::algorithms::regression::training::interface1::Online::setResult
services::Status setResult(const ResultPtr &res)
Definition: regression_training_online.h:84
daal::algorithms::regression::training::interface1::Online::getPartialResult
PartialResultPtr getPartialResult()
Definition: regression_training_online.h:96
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::Online::getResult
ResultPtr getResult()
Definition: regression_training_online.h:102
daal::algorithms::regression::training::interface1::Online
Provides methods for the regression model-based training in the online processing mode...
Definition: regression_training_online.h:55
daal::algorithms::regression::training::interface1::Online::setPartialResult
services::Status setPartialResult(const PartialResultPtr &partialResult)
Definition: regression_training_online.h:71

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