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

brownboost_quality_metric_set_batch.h
1 /* file: brownboost_quality_metric_set_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 // Interface for the BrownBoost quality metric set.
21 //--
22 */
23 
24 #ifndef __BROWNBOOST_QUALITY_METRIC_SET_BATCH_H__
25 #define __BROWNBOOST_QUALITY_METRIC_SET_BATCH_H__
26 
27 #include "algorithms/algorithm_quality_metric_set_batch.h"
28 #include "algorithms/classifier/binary_confusion_matrix_batch.h"
29 #include "algorithms/boosting/brownboost_quality_metric_set_types.h"
30 
31 namespace daal
32 {
33 namespace algorithms
34 {
35 namespace brownboost
36 {
40 namespace quality_metric_set
41 {
42 
43 namespace interface1
44 {
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::algorithms::brownboost::quality_metric_set::interface1::Batch
Class that represents a set of quality metrics to check the model trained with the BrownBoost algorit...
Definition: brownboost_quality_metric_set_batch.h:60
daal::algorithms::brownboost::quality_metric_set::interface1::InputDataCollection
Class that implements functionality of the collection of input objects of the quality metrics algorit...
Definition: brownboost_quality_metric_set_types.h:86
daal::algorithms::brownboost::quality_metric_set::confusionMatrix
Definition: brownboost_quality_metric_set_types.h:51
daal::algorithms::brownboost::quality_metric_set::interface1::ResultCollection
Class that implements functionality of the collection of result objects of the quality metrics algori...
Definition: brownboost_quality_metric_set_types.h:65
daal::services::interface1::staticPointerCast
SharedPtr< T > staticPointerCast(const SharedPtr< U > &r)
Definition: daal_shared_ptr.h:425
daal::algorithms::brownboost::quality_metric_set::interface1::Batch::Batch
Batch(bool useDefaultMetrics=true)
Definition: brownboost_quality_metric_set_batch.h:67
daal::algorithms::brownboost::quality_metric_set::interface1::Batch::getInputDataCollection
InputDataCollectionPtr getInputDataCollection()
Definition: brownboost_quality_metric_set_batch.h:93
daal::algorithms::brownboost::quality_metric_set::interface1::Batch::getResultCollection
ResultCollectionPtr getResultCollection()
Definition: brownboost_quality_metric_set_batch.h:83

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