48 #ifndef __KDTREE_KNN_CLASSIFICATION_PREDICT_H__
49 #define __KDTREE_KNN_CLASSIFICATION_PREDICT_H__
51 #include "algorithms/algorithm.h"
52 #include "algorithms/k_nearest_neighbors/kdtree_knn_classification_predict_types.h"
53 #include "algorithms/k_nearest_neighbors/kdtree_knn_classification_model.h"
54 #include "algorithms/classifier/classifier_predict.h"
55 #include "data_management/data/homogen_numeric_table.h"
61 namespace kdtree_knn_classification
77 template<
typename algorithmFPType, Method method, CpuType cpu>
78 class DAAL_EXPORT BatchContainer :
public PredictionContainerIface
85 BatchContainer(daal::services::Environment::env *daalEnv);
92 services::Status compute() DAAL_C11_OVERRIDE;
111 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
112 class Batch :
public classifier::prediction::Batch
130 Batch(
const Batch<algorithmFPType, method> & other) : classifier::prediction::Batch(other), input(other.input), parameter(other.parameter)
139 Input * getInput() DAAL_C11_OVERRIDE {
return &input; }
145 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
152 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
154 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
158 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
160 return new Batch<algorithmFPType, method>(*this);
163 services::Status allocateResult() DAAL_C11_OVERRIDE
165 services::Status s = _result->allocate<algorithmFPType>(&input, ¶meter, (int)method);
166 _res = _result.get();
173 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
181 using interface1::BatchContainer;
182 using interface1::Batch;
daal::algorithms::kdtree_knn_classification::prediction::interface1::BatchContainer
Class containing computation methods for KD-tree based kNN model-based prediction.
Definition: kdtree_knn_classification_predict.h:78
daal
Definition: algorithm_base_common.h:57
daal::algorithms::kdtree_knn_classification::prediction::interface1::Batch::input
Input input
Definition: kdtree_knn_classification_predict.h:115
daal::algorithms::kdtree_knn_classification::prediction::interface1::Batch::Batch
Batch()
Definition: kdtree_knn_classification_predict.h:119
daal::algorithms::PredictionContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the algor...
Definition: prediction.h:66
daal::batch
Definition: daal_defines.h:131
daal::algorithms::kdtree_knn_classification::prediction::interface1::Batch::parameter
Parameter parameter
Definition: kdtree_knn_classification_predict.h:116
daal::algorithms::kdtree_knn_classification::prediction::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: kdtree_knn_classification_predict.h:152
daal::algorithms::kdtree_knn_classification::prediction::interface1::Batch
Provides methods to run implementations of the KD-tree based kNN model-based prediction.
Definition: kdtree_knn_classification_predict.h:112
daal::algorithms::classifier::prediction::prediction
Definition: classifier_predict_types.h:102
daal::algorithms::kdtree_knn_classification::prediction::interface1::Batch::getInput
Input * getInput() DAAL_C11_OVERRIDE
Definition: kdtree_knn_classification_predict.h:139
daal::algorithms::kdtree_knn_classification::prediction::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: kdtree_knn_classification_predict.h:145
daal::algorithms::kdtree_knn_classification::prediction::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: kdtree_knn_classification_predict.h:130