48 #ifndef __KDTREE_KNN_CLASSIFICATION_MODEL_H__
49 #define __KDTREE_KNN_CLASSIFICATION_MODEL_H__
51 #include "algorithms/classifier/classifier_model.h"
52 #include "data_management/data/aos_numeric_table.h"
53 #include "data_management/data/soa_numeric_table.h"
54 #include "data_management/data/homogen_numeric_table.h"
55 #include "algorithms/engines/mt19937/mt19937.h"
57 using namespace daal::services;
74 namespace kdtree_knn_classification
100 struct DAAL_EXPORT Parameter :
public daal::algorithms::classifier::Parameter
109 Parameter(
size_t nClasses = 2,
size_t nNeighbors = 1,
int randomSeed = 777, DataUseInModel dataUse = doNotUse)
110 : daal::algorithms::classifier::Parameter(nClasses),
113 dataUseInModel(dataUse),
114 engine(engines::mt19937::Batch<>::create())
120 services::Status check() const DAAL_C11_OVERRIDE;
124 DataUseInModel dataUseInModel;
125 engines::EnginePtr engine;
140 class DAAL_EXPORT Model : public daal::algorithms::classifier::Model
143 DECLARE_MODEL_IFACE(Model, classifier::Model);
149 Model(
size_t nFeatures = 0);
156 static services::SharedPtr<Model> create(
size_t nFeatures = 0, services::Status *stat = NULL);
167 const ModelImpl *impl()
const {
return _impl; }
173 ModelImpl *impl() {
return _impl; }
179 size_t getNumberOfFeatures() const DAAL_C11_OVERRIDE;
182 Model(
size_t nFeatures, services::Status &st);
184 services::Status serializeImpl(data_management::InputDataArchive *arch) DAAL_C11_OVERRIDE;
186 services::Status deserializeImpl(const data_management::OutputDataArchive *arch) DAAL_C11_OVERRIDE;
191 typedef services::SharedPtr<Model> ModelPtr;
194 using interface1::Parameter;
195 using interface1::Model;
196 using interface1::ModelPtr;
daal::algorithms::kdtree_knn_classification::interface1::Parameter
KD-tree based kNN algorithm parameters.
Definition: kdtree_knn_classification_model.h:100
daal
Definition: algorithm_base_common.h:57
daal::algorithms::kdtree_knn_classification::doNotUse
Definition: kdtree_knn_classification_model.h:83
daal::algorithms::kdtree_knn_classification::doUse
Definition: kdtree_knn_classification_model.h:84
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:81
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:140
daal::algorithms::kdtree_knn_classification::interface1::Model::impl
const ModelImpl * impl() const
Definition: kdtree_knn_classification_model.h:167
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:109
daal::algorithms::kdtree_knn_classification::interface1::Model::impl
ModelImpl * impl()
Definition: kdtree_knn_classification_model.h:173
daal::services
Contains classes that implement service functionality, including error handling, memory allocation...
Definition: collection.h:51