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

classifier_training_online.h
1 /* file: classifier_training_online.h */
2 /*******************************************************************************
3 * Copyright 2014-2017 Intel Corporation
4 * All Rights Reserved.
5 *
6 * If this software was obtained under the Intel Simplified Software License,
7 * the following terms apply:
8 *
9 * The source code, information and material ("Material") contained herein is
10 * owned by Intel Corporation or its suppliers or licensors, and title to such
11 * Material remains with Intel Corporation or its suppliers or licensors. The
12 * Material contains proprietary information of Intel or its suppliers and
13 * licensors. The Material is protected by worldwide copyright laws and treaty
14 * provisions. No part of the Material may be used, copied, reproduced,
15 * modified, published, uploaded, posted, transmitted, distributed or disclosed
16 * in any way without Intel's prior express written permission. No license under
17 * any patent, copyright or other intellectual property rights in the Material
18 * is granted to or conferred upon you, either expressly, by implication,
19 * inducement, estoppel or otherwise. Any license under such intellectual
20 * property rights must be express and approved by Intel in writing.
21 *
22 * Unless otherwise agreed by Intel in writing, you may not remove or alter this
23 * notice or any other notice embedded in Materials by Intel or Intel's
24 * suppliers or licensors in any way.
25 *
26 *
27 * If this software was obtained under the Apache License, Version 2.0 (the
28 * "License"), the following terms apply:
29 *
30 * You may not use this file except in compliance with the License. You may
31 * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
32 *
33 *
34 * Unless required by applicable law or agreed to in writing, software
35 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
36 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
37 *
38 * See the License for the specific language governing permissions and
39 * limitations under the License.
40 *******************************************************************************/
41 
42 /*
43 //++
44 // Implementation of the interface for the classifier model training algorithm.
45 //--
46 */
47 
48 #ifndef __CLASSIFIER_TRAINING_ONLINE_H__
49 #define __CLASSIFIER_TRAINING_ONLINE_H__
50 
51 #include "services/daal_defines.h"
52 
53 namespace daal
54 {
55 namespace algorithms
56 {
57 namespace classifier
58 {
59 namespace training
60 {
61 
62 namespace interface1
63 {
81 class DAAL_EXPORT Online : public Training<online>
82 {
83 public:
84  Input input;
86  Online()
87  {
88  initialize();
89  }
90 
97  Online(const Online &other) : input(other.input)
98  {
99  initialize();
100  }
101 
102  virtual ~Online() {}
103 
109  services::Status setPartialResult(const PartialResultPtr &partialResult, bool initFlag = false)
110  {
111  DAAL_CHECK(partialResult, services::ErrorNullPartialResult)
112  _partialResult = partialResult;
113  _pres = _partialResult.get();
114  setInitFlag(initFlag);
115  return services::Status();
116  }
117 
122  services::Status setResult(const ResultPtr& res)
123  {
124  DAAL_CHECK(res, services::ErrorNullResult)
125  _result = res;
126  _res = _result.get();
127  return services::Status();
128  }
129 
134  PartialResultPtr getPartialResult() { return _partialResult; }
135 
140  ResultPtr getResult() { return _result; }
141 
147  services::SharedPtr<Online> clone() const
148  {
149  return services::SharedPtr<Online>(cloneImpl());
150  }
151 
152 protected:
153  PartialResultPtr _partialResult;
154  ResultPtr _result;
155 
156  void initialize()
157  {
158  _in = &input;
159  }
160  virtual Online * cloneImpl() const DAAL_C11_OVERRIDE = 0;
161 };
163 } // namespace interface1
164 using interface1::Online;
165 
166 }
167 }
168 }
169 }
170 #endif
daal::algorithms::classifier::training::interface1::Input
Base class for the input objects in the training stage of the classification algorithms.
Definition: classifier_training_types.h:134
daal::algorithms::classifier::training::interface1::Online::Online
Online(const Online &other)
Definition: classifier_training_online.h:97
daal
Definition: algorithm_base_common.h:57
daal::algorithms::classifier::training::interface1::Online::clone
services::SharedPtr< Online > clone() const
Definition: classifier_training_online.h:147
daal::algorithms::classifier::training::interface1::Online::input
Input input
Definition: classifier_training_online.h:84
daal::algorithms::classifier::training::interface1::Online
Algorithm class for training the classifier model in the online processing mode.
Definition: classifier_training_online.h:81
daal::services::ErrorNullPartialResult
Definition: error_indexes.h:131
daal_defines.h
daal::algorithms::classifier::training::interface1::Online::setResult
services::Status setResult(const ResultPtr &res)
Definition: classifier_training_online.h:122
daal::algorithms::classifier::training::interface1::Online::getPartialResult
PartialResultPtr getPartialResult()
Definition: classifier_training_online.h:134
daal::algorithms::classifier::training::interface1::Online::setPartialResult
services::Status setPartialResult(const PartialResultPtr &partialResult, bool initFlag=false)
Definition: classifier_training_online.h:109
daal::algorithms::classifier::training::interface1::Online::getResult
ResultPtr getResult()
Definition: classifier_training_online.h:140
daal::services::ErrorNullResult
Definition: error_indexes.h:122
daal::algorithms::Training
Provides methods to train models that depend on the data provided. For example, these methods enable ...
Definition: training.h:86

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