22 #ifndef __KDTREE_KNN_CLASSIFICATION_MODEL_H__
23 #define __KDTREE_KNN_CLASSIFICATION_MODEL_H__
25 #include "algorithms/classifier/classifier_model.h"
26 #include "data_management/data/aos_numeric_table.h"
27 #include "data_management/data/soa_numeric_table.h"
28 #include "data_management/data/homogen_numeric_table.h"
29 #include "algorithms/engines/mcg59/mcg59.h"
46 namespace kdtree_knn_classification
72 struct DAAL_EXPORT Parameter :
public daal::algorithms::classifier::Parameter
81 Parameter(
size_t nClasses = 2,
size_t nNeighbors = 1,
int randomSeed = 777, DataUseInModel dataUse = doNotUse)
82 : daal::algorithms::classifier::Parameter(nClasses),
85 dataUseInModel(dataUse),
86 engine(engines::mcg59::Batch<>::create())
92 services::Status check() const DAAL_C11_OVERRIDE;
96 DataUseInModel dataUseInModel;
97 engines::EnginePtr engine;
112 class DAAL_EXPORT Model : public daal::algorithms::classifier::Model
115 DECLARE_MODEL_IFACE(Model, classifier::Model);
121 Model(
size_t nFeatures = 0);
128 static services::SharedPtr<Model> create(
size_t nFeatures = 0, services::Status *stat = NULL);
139 const ModelImpl *impl()
const {
return _impl; }
145 ModelImpl *impl() {
return _impl; }
151 size_t getNumberOfFeatures() const DAAL_C11_OVERRIDE;
154 Model(
size_t nFeatures, services::Status &st);
156 services::Status serializeImpl(data_management::InputDataArchive *arch) DAAL_C11_OVERRIDE;
158 services::Status deserializeImpl(const data_management::OutputDataArchive *arch) DAAL_C11_OVERRIDE;
163 typedef services::SharedPtr<Model> ModelPtr;
166 using interface1::Parameter;
167 using interface1::Model;
168 using interface1::ModelPtr;
daal::algorithms::kdtree_knn_classification::interface1::Parameter
KD-tree based kNN algorithm parameters.
Definition: kdtree_knn_classification_model.h:72
daal
Definition: algorithm_base_common.h:31
daal::algorithms::kdtree_knn_classification::doNotUse
Definition: kdtree_knn_classification_model.h:55
daal::algorithms::kdtree_knn_classification::doUse
Definition: kdtree_knn_classification_model.h:56
daal::algorithms::kdtree_knn_classification::DataUseInModel
DataUseInModel
The option to enable/disable an usage of the input dataset in kNN model.
Definition: kdtree_knn_classification_model.h:53
daal::algorithms::kdtree_knn_classification::interface1::Model
Base class for models trained with the KD-tree based kNN algorithm
Definition: kdtree_knn_classification_model.h:112
daal::algorithms::kdtree_knn_classification::interface1::Model::impl
const ModelImpl * impl() const
Definition: kdtree_knn_classification_model.h:139
daal::algorithms::kdtree_knn_classification::interface1::Parameter::Parameter
Parameter(size_t nClasses=2, size_t nNeighbors=1, int randomSeed=777, DataUseInModel dataUse=doNotUse)
Definition: kdtree_knn_classification_model.h:81
daal::algorithms::kdtree_knn_classification::interface1::Model::impl
ModelImpl * impl()
Definition: kdtree_knn_classification_model.h:145