48 #ifndef __RIDGE_REGRESSION_TRAINING_BATCH_H__
49 #define __RIDGE_REGRESSION_TRAINING_BATCH_H__
51 #include "algorithms/algorithm.h"
52 #include "services/daal_defines.h"
53 #include "services/daal_memory.h"
54 #include "algorithms/ridge_regression/ridge_regression_training_types.h"
55 #include "algorithms/ridge_regression/ridge_regression_model.h"
56 #include "algorithms/linear_model/linear_model_training_batch.h"
62 namespace ridge_regression
77 template<
typename algorithmFPType, Method method, CpuType cpu>
78 class DAAL_EXPORT BatchContainer :
public TrainingContainerIface<batch>
85 BatchContainer(daal::services::Environment::env *daalEnv);
95 services::Status compute() DAAL_C11_OVERRIDE;
114 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = normEqDense>
115 class DAAL_EXPORT Batch :
public linear_model::training::Batch
119 TrainParameter parameter;
133 Batch(
const Batch<algorithmFPType, method> &other) : input(other.input), parameter(other.parameter)
140 virtual regression::training::Input* getInput() DAAL_C11_OVERRIDE {
return &input; }
146 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
152 ResultPtr getResult() {
return Result::cast(_result); }
160 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
162 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
167 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
169 return new Batch<algorithmFPType, method>(*this);
172 services::Status allocateResult() DAAL_C11_OVERRIDE
174 services::Status s = getResult()->template allocate<algorithmFPType>(&input, ¶meter, method);
175 _res = _result.get();
181 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
184 _result.reset(
new Result());
190 using interface1::BatchContainer;
191 using interface1::Batch;
daal::algorithms::ridge_regression::training::interface1::Batch
Provides methods for ridge regression model-based training in the batch processing mode...
Definition: ridge_regression_training_batch.h:115
daal
Definition: algorithm_base_common.h:57
daal::algorithms::ridge_regression::training::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: ridge_regression_training_batch.h:146
daal::batch
Definition: daal_defines.h:131
daal::algorithms::ridge_regression::training::interface1::Batch::Batch
Batch()
Definition: ridge_regression_training_batch.h:122
daal::algorithms::ridge_regression::training::interface1::Batch::parameter
TrainParameter parameter
Definition: ridge_regression_training_batch.h:119
daal::algorithms::ridge_regression::training::interface1::BatchContainer
Class containing methods for normal equations ridge regression model-based training using algorithmFP...
Definition: ridge_regression_training_batch.h:78
daal::algorithms::ridge_regression::training::interface1::Batch::input
Input input
Definition: ridge_regression_training_batch.h:118
daal::algorithms::ridge_regression::training::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: ridge_regression_training_batch.h:160
daal::algorithms::ridge_regression::training::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: ridge_regression_training_batch.h:133
daal::algorithms::ridge_regression::training::interface1::Batch::getResult
ResultPtr getResult()
Definition: ridge_regression_training_batch.h:152
daal::algorithms::TrainingContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the model...
Definition: training.h:76