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/mcg59/mcg59.h" 72 namespace kdtree_knn_classification
98 struct DAAL_EXPORT Parameter :
public daal::algorithms::classifier::Parameter
107 Parameter(
size_t nClasses = 2,
size_t nNeighbors = 1,
int randomSeed = 777, DataUseInModel dataUse = doNotUse)
108 : daal::algorithms::classifier::Parameter(nClasses),
111 dataUseInModel(dataUse),
112 engine(engines::mcg59::Batch<>::create())
118 services::Status check()
const DAAL_C11_OVERRIDE;
122 DataUseInModel dataUseInModel;
123 engines::EnginePtr engine;
138 class DAAL_EXPORT Model :
public daal::algorithms::classifier::Model
141 DECLARE_MODEL_IFACE(Model, classifier::Model);
147 Model(
size_t nFeatures = 0);
154 static services::SharedPtr<Model> create(
size_t nFeatures = 0, services::Status *stat = NULL);
165 const ModelImpl *impl()
const {
return _impl; }
171 ModelImpl *impl() {
return _impl; }
177 size_t getNumberOfFeatures()
const DAAL_C11_OVERRIDE;
180 Model(
size_t nFeatures, services::Status &st);
182 services::Status serializeImpl(data_management::InputDataArchive *arch) DAAL_C11_OVERRIDE;
184 services::Status deserializeImpl(
const data_management::OutputDataArchive *arch) DAAL_C11_OVERRIDE;
189 typedef services::SharedPtr<Model> ModelPtr;
192 using interface1::Parameter;
193 using interface1::Model;
194 using interface1::ModelPtr;
daal::algorithms::kdtree_knn_classification::interface1::Parameter
KD-tree based kNN algorithm parameters.
Definition: kdtree_knn_classification_model.h:98
daal::algorithms::kdtree_knn_classification::doUse
Definition: kdtree_knn_classification_model.h:82
daal::services::interface1::Status
Class that holds the results of API calls. In case of API routine failure it contains the list of err...
Definition: error_handling.h:491
daal
Definition: algorithm_base_common.h:57
daal::algorithms::classifier::interface1::Parameter
Base class for the parameters of the classification algorithm.
Definition: classifier_model.h:81
daal::algorithms::kdtree_knn_classification::doNotUse
Definition: kdtree_knn_classification_model.h:81
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:79
daal::services::interface1::SharedPtr
Shared pointer that retains shared ownership of an object through a pointer. Several SharedPtr object...
Definition: daal_shared_ptr.h:187
daal::algorithms::classifier::interface1::Model
Base class for the model of the classification algorithm.
Definition: classifier_model.h:95
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:138
daal::data_management::interface1::OutputDataArchive
Provides methods to restore an object from its serialized counterpart and access the restored object...
Definition: data_archive.h:978
daal::algorithms::kdtree_knn_classification::interface1::Model::impl
const ModelImpl * impl() const
Definition: kdtree_knn_classification_model.h:165
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:107
daal::algorithms::kdtree_knn_classification::interface1::Parameter::engine
engines::EnginePtr engine
Definition: kdtree_knn_classification_model.h:123
daal::algorithms::kdtree_knn_classification::interface1::Model::impl
ModelImpl * impl()
Definition: kdtree_knn_classification_model.h:171
daal::algorithms::kdtree_knn_classification::interface1::Parameter::dataUseInModel
DataUseInModel dataUseInModel
Definition: kdtree_knn_classification_model.h:122
daal::algorithms::kdtree_knn_classification::interface1::Parameter::seed
int seed
Definition: kdtree_knn_classification_model.h:121
daal::algorithms::kdtree_knn_classification::interface1::Parameter::k
size_t k
Definition: kdtree_knn_classification_model.h:120