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

regression_predict.h
1 /* file: regression_predict.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 interface for the regression model-based prediction
19 //--
20 */
21 
22 #ifndef __REGRESSION_PREDICT_H__
23 #define __REGRESSION_PREDICT_H__
24 
25 #include "algorithms/algorithm.h"
26 #include "algorithms/regression/regression_predict_types.h"
27 
28 namespace daal
29 {
30 namespace algorithms
31 {
32 namespace regression
33 {
34 namespace prediction
35 {
36 namespace interface1
37 {
51 class Batch : public daal::algorithms::Prediction
52 {
53 public:
54  typedef algorithms::regression::prediction::Input InputType;
55  typedef algorithms::Parameter ParameterType;
56  typedef algorithms::regression::prediction::Result ResultType;
57 
58  virtual ~Batch() {}
59  virtual InputType* getInput() = 0;
60 
67  services::Status setResult(const ResultPtr& res)
68  {
69  DAAL_CHECK(res, services::ErrorNullResult)
70  _result = res;
71  _res = _result.get();
72  return services::Status();
73  }
74 
79  ResultPtr getResult() { return _result; }
80 
81 protected:
82  ResultPtr _result;
83 };
85 }
86 using interface1::Batch;
87 }
88 }
89 }
90 }
91 #endif
daal
Definition: algorithm_base_common.h:31
daal::algorithms::Prediction
Provides prediction methods depending on the model such as linear_regression::Model. The methods of the class support different computation modes: batch, distributed, and online(see ComputeMode). Classes that implement specific algorithms of the model based data prediction are derived classes of the Prediction class. The class additionally provides virtual methods for validation of input and output parameters of the algorithms.
Definition: prediction.h:50
daal::algorithms::regression::prediction::interface1::Batch::getResult
ResultPtr getResult()
Definition: regression_predict.h:79
daal::algorithms::regression::prediction::interface1::Batch::setResult
services::Status setResult(const ResultPtr &res)
Definition: regression_predict.h:67
daal::algorithms::classifier::prediction::prediction
Definition: classifier_predict_types.h:76
daal::algorithms::regression::prediction::interface1::Batch
Provides methods to run implementations of the regression model-based prediction. ...
Definition: regression_predict.h:51
daal::services::ErrorNullResult
Definition: error_indexes.h:96

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