48 #ifndef __LOGIT_BOOST_TRAINING_BATCH_H__ 49 #define __LOGIT_BOOST_TRAINING_BATCH_H__ 51 #include "algorithms/boosting/boosting_training_batch.h" 52 #include "algorithms/boosting/logitboost_training_types.h" 78 template<
typename algorithmFPType, Method method, CpuType cpu>
79 class DAAL_EXPORT BatchContainer :
public TrainingContainerIface<batch>
87 BatchContainer(daal::services::Environment::env *daalEnv);
93 services::Status compute() DAAL_C11_OVERRIDE;
113 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = friedman>
114 class DAAL_EXPORT Batch :
public boosting::training::Batch
117 typedef boosting::training::Batch super;
119 typedef typename super::InputType InputType;
120 typedef algorithms::logitboost::Parameter ParameterType;
121 typedef algorithms::logitboost::training::Result ResultType;
123 ParameterType parameter;
130 Batch(
size_t nClasses)
133 parameter.nClasses = nClasses;
142 Batch(
const Batch<algorithmFPType, method> &other) : boosting::training::Batch(other),
143 parameter(other.parameter), input(other.input)
154 InputType * getInput() DAAL_C11_OVERRIDE {
return &input; }
160 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
166 ResultPtr getResult()
168 return ResultType::cast(_result);
174 services::Status resetResult() DAAL_C11_OVERRIDE
176 _result.reset(
new ResultType());
177 DAAL_CHECK(_result, services::ErrorNullResult);
179 return services::Status();
187 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const 189 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
193 virtual Batch<algorithmFPType, method> * cloneImpl()
const DAAL_C11_OVERRIDE
195 return new Batch<algorithmFPType, method>(*this);
198 services::Status allocateResult() DAAL_C11_OVERRIDE
200 ResultPtr res = getResult();
201 DAAL_CHECK(_result, services::ErrorNullResult);
202 services::Status s = res->template allocate<algorithmFPType>(&input, _par, method);
203 _res = _result.get();
209 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
212 _result.reset(
new ResultType());
217 using interface1::BatchContainer;
218 using interface1::Batch;
224 #endif // __LOGIT_BOOST_TRAINING_BATCH_H__
daal::services::interface1::Environment::_envStruct
The environment structure.
Definition: env_detect.h:95
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::logitboost::training::interface1::Batch::Batch
Batch(size_t nClasses)
Definition: logitboost_training_batch.h:130
daal::algorithms::boosting::training::interface1::Batch
Base class for training models of boosting algorithms in the batch processing mode ...
Definition: boosting_training_batch.h:95
daal::algorithms::logitboost::training::interface1::Batch::resetResult
services::Status resetResult() DAAL_C11_OVERRIDE
Definition: logitboost_training_batch.h:174
daal::algorithms::logitboost::training::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: logitboost_training_batch.h:142
daal::batch
Definition: daal_defines.h:132
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::logitboost::training::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: logitboost_training_batch.h:160
daal::algorithms::logitboost::training::interface1::Batch::getResult
ResultPtr getResult()
Definition: logitboost_training_batch.h:166
daal::algorithms::logitboost::interface1::Parameter
LogitBoost algorithm parameters.
Definition: logitboost_model.h:81
daal::services::interface1::SharedPtr::get
T * get() const
Definition: daal_shared_ptr.h:332
daal::algorithms::logitboost::training::interface1::Batch::parameter
ParameterType parameter
Definition: logitboost_training_batch.h:123
daal::algorithms::classifier::training::interface1::Batch
Algorithm class for training the classifier model.
Definition: classifier_training_batch.h:82
daal::algorithms::boosting::interface1::Parameter
Base class for parameters of the boosting algorithm
Definition: boosting_model.h:84
daal::algorithms::classifier::training::interface1::Result
Provides methods to access final results obtained with the compute() method in the batch processing m...
Definition: classifier_training_types.h:222
daal::algorithms::logitboost::training::interface1::Batch::input
InputType input
Definition: logitboost_training_batch.h:124
daal::algorithms::logitboost::training::interface1::Result
Provides methods to access final results obtained with the compute() method of the LogitBoost trainin...
Definition: logitboost_training_types.h:97
daal::algorithms::logitboost::training::interface1::Batch::getInput
InputType * getInput() DAAL_C11_OVERRIDE
Definition: logitboost_training_batch.h:154
daal::algorithms::logitboost::training::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: logitboost_training_batch.h:187
daal::algorithms::logitboost::training::interface1::Batch
Trains model of the LogitBoost algorithms in the batch processing mode.
Definition: logitboost_training_batch.h:114
daal::algorithms::logitboost::training::interface1::BatchContainer
Provides methods to run implementations of LogitBoost model-based training. This class is associated ...
Definition: logitboost_training_batch.h:79
daal::services::ErrorNullResult
Definition: error_indexes.h:122
daal::algorithms::TrainingContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the model...
Definition: training.h:76
daal::algorithms::classifier::interface1::Parameter::nClasses
size_t nClasses
Definition: classifier_model.h:85