49 #ifndef __MSE_BATCH_H__ 50 #define __MSE_BATCH_H__ 52 #include "algorithms/algorithm.h" 53 #include "data_management/data/numeric_table.h" 54 #include "data_management/data/homogen_numeric_table.h" 55 #include "services/daal_defines.h" 56 #include "sum_of_functions_batch.h" 57 #include "mse_types.h" 63 namespace optimization_solver
84 template<
typename algorithmFPType, Method method, CpuType cpu>
85 class DAAL_EXPORT BatchContainer :
public daal::algorithms::AnalysisContainerIface<batch>
93 BatchContainer(daal::services::Environment::env *daalEnv);
95 virtual ~BatchContainer();
101 virtual services::Status compute() DAAL_C11_OVERRIDE;
120 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
121 class DAAL_EXPORT Batch :
public sum_of_functions::Batch
124 typedef sum_of_functions::Batch super;
126 typedef algorithms::optimization_solver::mse::Input InputType;
127 typedef algorithms::optimization_solver::mse::Parameter ParameterType;
128 typedef typename super::ResultType ResultType;
133 Batch(
size_t numberOfTerms) : parameter(numberOfTerms), sum_of_functions::Batch(numberOfTerms, &input, ¶meter)
146 Batch(
const Batch<algorithmFPType, method> &other) :
147 parameter(other.parameter), sum_of_functions::Batch(other.parameter.numberOfTerms, &input, ¶meter), input(other.input)
156 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
163 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const 165 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
173 services::Status allocate()
175 return allocateResult();
179 virtual Batch<algorithmFPType, method> *cloneImpl()
const DAAL_C11_OVERRIDE
181 return new Batch<algorithmFPType, method>(*this);
184 virtual services::Status allocateResult() DAAL_C11_OVERRIDE
186 services::Status s = _result->allocate<algorithmFPType>(&input, ¶meter, (int) method);
187 _res = _result.get();
193 Analysis<batch>::_ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
200 ParameterType parameter;
205 using interface1::BatchContainer;
206 using interface1::Batch;
daal::algorithms::optimization_solver::mse::interface1::Batch::parameter
ParameterType parameter
Definition: mse_batch.h:200
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::optimization_solver::mse::interface1::Batch
Computes the Mean squared error objective function in the batch processing mode.
Definition: mse_batch.h:121
daal::algorithms::optimization_solver::mse::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: mse_batch.h:163
daal::algorithms::AnalysisContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the analy...
Definition: analysis.h:79
daal::algorithms::optimization_solver::mse::interface1::Batch::allocate
services::Status allocate()
Definition: mse_batch.h:173
daal::algorithms::optimization_solver::mse::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: mse_batch.h:156
daal::algorithms::optimization_solver::objective_function::interface1::Result
Provides methods to access final results obtained with the compute() method of the Objective function...
Definition: objective_function_types.h:186
daal::algorithms::optimization_solver::mse::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: mse_batch.h:146
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:87
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::optimization_solver::mse::interface1::Batch::~Batch
virtual ~Batch()
Definition: mse_batch.h:138
daal::algorithms::optimization_solver::mse::interface1::Batch::input
InputType input
Definition: mse_batch.h:199
daal::algorithms::optimization_solver::mse::interface1::Parameter
Parameter for Mean squared error objective function
Definition: mse_types.h:111
daal::algorithms::Analysis
Provides methods for execution of operations over data, such as computation of Summary Statistics est...
Definition: analysis.h:94
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:85
daal::algorithms::optimization_solver::mse::interface1::Batch::Batch
Batch(size_t numberOfTerms)
Definition: mse_batch.h:133