48 #ifndef __DECISION_FOREST_CLASSIFICATION_TRAINING_BATCH_H__
49 #define __DECISION_FOREST_CLASSIFICATION_TRAINING_BATCH_H__
51 #include "algorithms/classifier/classifier_training_batch.h"
52 #include "algorithms/decision_forest/decision_forest_classification_training_types.h"
58 namespace decision_forest
60 namespace classification
79 template<
typename algorithmFPType, Method method, CpuType cpu>
80 class DAAL_EXPORT BatchContainer :
public TrainingContainerIface<batch>
88 BatchContainer(daal::services::Environment::env *daalEnv);
95 services::Status compute() DAAL_C11_OVERRIDE;
115 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
116 class DAAL_EXPORT Batch :
public classifier::training::Batch
120 classifier::training::Input input;
126 Batch(
size_t nClasses) : parameter(nClasses)
129 parameter.minObservationsInLeafNode = 1;
138 Batch(
const Batch<algorithmFPType, method> &other) : classifier::training::Batch(other),
139 parameter(other.parameter), input(other.input)
150 classifier::training::Input * getInput() DAAL_C11_OVERRIDE {
return &input; }
156 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
162 ResultPtr getResult()
164 return Result::cast(_result);
170 services::Status resetResult() DAAL_C11_OVERRIDE
172 _result.reset(
new Result());
173 DAAL_CHECK(_result, services::ErrorNullResult);
175 return services::Status();
183 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
185 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
188 virtual services::Status checkComputeParams() DAAL_C11_OVERRIDE;
191 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
193 return new Batch<algorithmFPType, method>(*this);
196 services::Status allocateResult() DAAL_C11_OVERRIDE
198 ResultPtr res = getResult();
199 DAAL_CHECK(res, services::ErrorNullResult);
200 services::Status s = res->template allocate<algorithmFPType>(&input, _par, method);
201 _res = _result.get();
207 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
210 _result.reset(
new Result());
215 using interface1::BatchContainer;
216 using interface1::Batch;
223 #endif // __LOGIT_BOOST_TRAINING_BATCH_H__
daal::algorithms::decision_forest::classification::training::interface1::Result
Provides methods to access final results obtained with the compute() method of the LogitBoost trainin...
Definition: decision_forest_classification_training_types.h:122
daal
Definition: algorithm_base_common.h:57
daal::algorithms::decision_forest::classification::training::interface1::Batch::getInput
classifier::training::Input * getInput() DAAL_C11_OVERRIDE
Definition: decision_forest_classification_training_batch.h:150
daal::algorithms::decision_forest::classification::training::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: decision_forest_classification_training_batch.h:183
daal::algorithms::decision_forest::classification::training::interface1::BatchContainer
Provides methods to run implementations of Decision forest model-based training. This class is associ...
Definition: decision_forest_classification_training_batch.h:80
daal::algorithms::decision_forest::classification::training::interface1::Parameter
Decision forest algorithm parameters.
Definition: decision_forest_classification_training_types.h:108
daal::batch
Definition: daal_defines.h:131
daal::algorithms::decision_forest::classification::training::interface1::Batch::parameter
Parameter parameter
Definition: decision_forest_classification_training_batch.h:119
daal::algorithms::decision_forest::classification::training::interface1::Batch::getResult
ResultPtr getResult()
Definition: decision_forest_classification_training_batch.h:162
daal::algorithms::decision_forest::classification::training::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: decision_forest_classification_training_batch.h:156
daal::algorithms::decision_forest::classification::training::interface1::Batch::input
classifier::training::Input input
Definition: decision_forest_classification_training_batch.h:120
daal::algorithms::decision_forest::classification::training::interface1::Batch
Trains model of the Decision forest algorithms in the batch processing mode.
Definition: decision_forest_classification_training_batch.h:116
daal::algorithms::decision_forest::classification::training::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: decision_forest_classification_training_batch.h:138
daal::algorithms::decision_forest::classification::training::interface1::Batch::Batch
Batch(size_t nClasses)
Definition: decision_forest_classification_training_batch.h:126
daal::services::ErrorNullResult
Definition: error_indexes.h:122
daal::algorithms::decision_forest::classification::training::interface1::Batch::resetResult
services::Status resetResult() DAAL_C11_OVERRIDE
Definition: decision_forest_classification_training_batch.h:170
daal::algorithms::TrainingContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the model...
Definition: training.h:76