25 #ifndef __MSE_BATCH_H__
26 #define __MSE_BATCH_H__
28 #include "algorithms/algorithm.h"
29 #include "data_management/data/numeric_table.h"
30 #include "data_management/data/homogen_numeric_table.h"
31 #include "services/daal_defines.h"
32 #include "sum_of_functions_batch.h"
33 #include "mse_types.h"
39 namespace optimization_solver
60 template<
typename algorithmFPType, Method method, CpuType cpu>
61 class BatchContainer :
public daal::algorithms::AnalysisContainerIface<batch>
69 DAAL_DEPRECATED BatchContainer(daal::services::Environment::env *daalEnv);
71 DAAL_DEPRECATED_VIRTUAL
virtual ~BatchContainer();
77 DAAL_DEPRECATED_VIRTUAL
virtual services::Status compute() DAAL_C11_OVERRIDE;
96 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
97 class DAAL_EXPORT Batch :
public sum_of_functions::interface1::Batch
100 typedef sum_of_functions::interface1::Batch super;
102 typedef algorithms::optimization_solver::mse::interface1::Input InputType;
103 typedef algorithms::optimization_solver::mse::interface1::Parameter ParameterType;
104 typedef typename super::ResultType ResultType;
109 DAAL_DEPRECATED Batch(
size_t numberOfTerms) : parameter(numberOfTerms), sum_of_functions::interface1::Batch(numberOfTerms, &input, ¶meter)
114 DAAL_DEPRECATED_VIRTUAL
virtual ~Batch() {}
122 DAAL_DEPRECATED Batch(
const Batch<algorithmFPType, method> &other) :
123 parameter(other.parameter), sum_of_functions::interface1::Batch(other.parameter.numberOfTerms, &input, ¶meter), input(other.input)
132 DAAL_DEPRECATED_VIRTUAL
virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
139 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
141 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
149 DAAL_DEPRECATED services::Status allocate()
151 return allocateResult();
155 virtual Batch<algorithmFPType, method> *cloneImpl() const DAAL_C11_OVERRIDE
157 return new Batch<algorithmFPType, method>(*this);
160 virtual services::Status allocateResult() DAAL_C11_OVERRIDE
162 services::Status s = _result->allocate<algorithmFPType>(&input, ¶meter, (int) method);
163 _res = _result.get();
169 Analysis<batch>::_ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
176 ParameterType parameter;
198 template<
typename algorithmFPType, Method method, CpuType cpu>
199 class BatchContainer :
public daal::algorithms::AnalysisContainerIface<batch>
207 BatchContainer(daal::services::Environment::env *daalEnv);
209 virtual ~BatchContainer();
215 virtual services::Status compute() DAAL_C11_OVERRIDE;
234 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
235 class DAAL_EXPORT Batch :
public sum_of_functions::Batch
238 typedef sum_of_functions::Batch super;
240 typedef algorithms::optimization_solver::mse::Input InputType;
241 typedef algorithms::optimization_solver::mse::Parameter ParameterType;
242 typedef typename super::ResultType ResultType;
247 Batch(
size_t numberOfTerms);
257 Batch(
const Batch<algorithmFPType, method> &other);
263 ParameterType& parameter() {
return *
static_cast<ParameterType*
>(_par); }
269 const ParameterType& parameter()
const {
return *
static_cast<const ParameterType*
>(_par); }
275 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
282 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
284 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
292 services::Status allocate()
294 return allocateResult();
298 virtual Batch<algorithmFPType, method> *cloneImpl() const DAAL_C11_OVERRIDE
300 return new Batch<algorithmFPType, method>(*this);
303 virtual services::Status allocateResult() DAAL_C11_OVERRIDE
305 services::Status s = _result->allocate<algorithmFPType>(&input, _par, (int) method);
306 _res = _result.get();
312 Analysis<batch>::_ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
322 using interface2::BatchContainer;
323 using interface2::Batch;
daal::algorithms::optimization_solver::mse::interface1::BatchContainer::compute
virtual DAAL_DEPRECATED_VIRTUAL services::Status compute() DAAL_C11_OVERRIDE
daal::algorithms::optimization_solver::mse::interface1::BatchContainer::~BatchContainer
virtual DAAL_DEPRECATED_VIRTUAL ~BatchContainer()
daal::algorithms::optimization_solver::mse::interface1::Parameter
Parameter for Mean squared error objective function
Definition: mse_types.h:107
daal::algorithms::optimization_solver::mse::interface2::Batch::allocate
services::Status allocate()
Definition: mse_batch.h:292
daal::batch
Definition: daal_defines.h:112
daal::algorithms::optimization_solver::mse::interface2::BatchContainer::compute
virtual services::Status compute() DAAL_C11_OVERRIDE
daal::algorithms::optimization_solver::mse::interface2::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: mse_batch.h:275
daal::algorithms::optimization_solver::mse::interface1::Batch::Batch
DAAL_DEPRECATED Batch(size_t numberOfTerms)
Definition: mse_batch.h:109
daal::algorithms::optimization_solver::sum_of_functions::interface1::Batch
Interface for computing the Sum of functions in the batch processing mode.
Definition: sum_of_functions_batch.h:63
daal::algorithms::optimization_solver::mse::interface1::Input
Input objects for the Mean squared error objective function
Definition: mse_types.h:141
daal::algorithms::optimization_solver::mse::interface2::Batch
Computes the Mean squared error objective function in the batch processing mode.
Definition: mse_batch.h:235
daal::algorithms::AnalysisContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the analy...
Definition: analysis.h:55
daal::algorithms::optimization_solver::mse::interface1::BatchContainer::BatchContainer
DAAL_DEPRECATED BatchContainer(daal::services::Environment::env *daalEnv)
daal::algorithms::optimization_solver::mse::interface1::BatchContainer
Provides methods to run implementations of the mean squared error objective function. This class is associated with the Batch class and supports the method of computing the Mean squared error objective function in the batch processing mode.
Definition: mse_batch.h:61
daal::algorithms::optimization_solver::mse::interface2::BatchContainer::~BatchContainer
virtual ~BatchContainer()
daal::algorithms::optimization_solver::mse::interface1::Batch::input
InputType input
Definition: mse_batch.h:175
daal::algorithms::optimization_solver::mse::interface2::Batch::parameter
ParameterType & parameter()
Definition: mse_batch.h:263
daal::algorithms::optimization_solver::mse::interface2::Batch::input
InputType input
Definition: mse_batch.h:317
daal::algorithms::optimization_solver::mse::interface2::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: mse_batch.h:282
daal::algorithms::optimization_solver::mse::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: mse_batch.h:139
daal::algorithms::optimization_solver::mse::interface1::Batch::allocate
DAAL_DEPRECATED services::Status allocate()
Definition: mse_batch.h:149
daal::algorithms::optimization_solver::mse::interface2::Batch::parameter
const ParameterType & parameter() const
Definition: mse_batch.h:269
daal::algorithms::optimization_solver::mse::interface2::BatchContainer::BatchContainer
BatchContainer(daal::services::Environment::env *daalEnv)
daal::algorithms::optimization_solver::mse::interface1::Batch
Computes the Mean squared error objective function in the batch processing mode.
Definition: mse_batch.h:97
daal::algorithms::Analysis
Provides methods for execution of operations over data, such as computation of Summary Statistics est...
Definition: analysis.h:70
daal::algorithms::optimization_solver::mse::interface1::Batch::Batch
DAAL_DEPRECATED Batch(const Batch< algorithmFPType, method > &other)
Definition: mse_batch.h:122
daal::algorithms::optimization_solver::mse::interface1::Batch::getMethod
virtual DAAL_DEPRECATED_VIRTUAL int getMethod() const DAAL_C11_OVERRIDE
Definition: mse_batch.h:132
daal::algorithms::optimization_solver::mse::interface2::BatchContainer
Provides methods to run implementations of the mean squared error objective function. This class is associated with the Batch class and supports the method of computing the Mean squared error objective function in the batch processing mode.
Definition: mse_batch.h:199
daal::algorithms::optimization_solver::mse::interface1::Batch::parameter
ParameterType parameter
Definition: mse_batch.h:176