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

adaboost_quality_metric_set_batch.h
1 /* file: adaboost_quality_metric_set_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 // Interface for the AdaBoost quality metric set.
19 //--
20 */
21 
22 #ifndef __ADABOOST_QUALITY_METRIC_SET_BATCH_H__
23 #define __ADABOOST_QUALITY_METRIC_SET_BATCH_H__
24 
25 #include "algorithms/algorithm_quality_metric_set_batch.h"
26 #include "algorithms/classifier/binary_confusion_matrix_batch.h"
27 #include "algorithms/boosting/adaboost_quality_metric_set_types.h"
28 
29 namespace daal
30 {
31 namespace algorithms
32 {
33 namespace adaboost
34 {
38 namespace quality_metric_set
39 {
40 
41 namespace interface1
42 {
60 class Batch : public algorithms::quality_metric_set::Batch
61 {
62 public:
67  Batch(bool useDefaultMetrics = true) : algorithms::quality_metric_set::Batch(useDefaultMetrics)
68  {
69  _inputData = InputDataCollectionPtr(new InputDataCollection());
70  if (_useDefaultMetrics)
71  {
72  initializeQualityMetrics();
73  }
74  _resultCollection = ResultCollectionPtr(new ResultCollection());
75  }
76 
77  virtual ~Batch() {}
78 
83  ResultCollectionPtr getResultCollection()
84  {
85  return services::staticPointerCast<ResultCollection,
86  algorithms::quality_metric_set::ResultCollection>(_resultCollection);
87  }
88 
93  InputDataCollectionPtr getInputDataCollection()
94  {
95  return services::staticPointerCast<InputDataCollection,
96  algorithms::quality_metric_set::InputDataCollection>(_inputData);
97  }
98 
99 protected:
100  virtual void initializeQualityMetrics()
101  {
102  inputAlgorithms[confusionMatrix] = services::SharedPtr<classifier::quality_metric::binary_confusion_matrix::Batch<> >(
103  new classifier::quality_metric::binary_confusion_matrix::Batch<>());
104  _inputData->add(confusionMatrix, algorithms::InputPtr(
105  new classifier::quality_metric::binary_confusion_matrix::Input));
106  }
107 };
109 } // namespace interface1
110 using interface1::Batch;
111 
112 }
113 }
114 }
115 }
116 #endif
daal
Definition: algorithm_base_common.h:31
daal::algorithms::adaboost::quality_metric_set::interface1::InputDataCollection
Class that implements functionality of the collection of input objects of the quality metrics algorit...
Definition: adaboost_quality_metric_set_types.h:83
daal::algorithms::adaboost::quality_metric_set::interface1::Batch::getResultCollection
ResultCollectionPtr getResultCollection()
Definition: adaboost_quality_metric_set_batch.h:83
daal::algorithms::adaboost::quality_metric_set::confusionMatrix
Definition: adaboost_quality_metric_set_types.h:49
daal::algorithms::adaboost::quality_metric_set::interface1::Batch::Batch
Batch(bool useDefaultMetrics=true)
Definition: adaboost_quality_metric_set_batch.h:67
daal::algorithms::adaboost::quality_metric_set::interface1::Batch
Class that represents a set of quality metrics to check the model trained with the AdaBoost algorithm...
Definition: adaboost_quality_metric_set_batch.h:60
daal::algorithms::adaboost::quality_metric_set::interface1::ResultCollection
Class that implements functionality of the collection of result objects of the quality metrics algori...
Definition: adaboost_quality_metric_set_types.h:63
daal::algorithms::adaboost::quality_metric_set::interface1::Batch::getInputDataCollection
InputDataCollectionPtr getInputDataCollection()
Definition: adaboost_quality_metric_set_batch.h:93
daal::services::interface1::staticPointerCast
SharedPtr< T > staticPointerCast(const SharedPtr< U > &r)
Definition: daal_shared_ptr.h:422

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