23 #ifndef __LOGISTIC_REGRESSION_PREDICT_TYPES_H__
24 #define __LOGISTIC_REGRESSION_PREDICT_TYPES_H__
26 #include "algorithms/algorithm.h"
27 #include "algorithms/logistic_regression/logistic_regression_model.h"
28 #include "algorithms/classifier/classifier_predict_types.h"
34 namespace logistic_regression
60 enum ResultToComputeId
62 computeClassesLabels = 0x00000001ULL,
63 computeClassesProbabilities = 0x00000002ULL,
64 computeClassesLogProbabilities = 0x00000004ULL
71 enum ResultNumericTableId
73 probabilities = classifier::prediction::lastResultId + 1,
81 lastResultNumericTableId = logProbabilities
97 struct DAAL_EXPORT Parameter :
public daal::algorithms::classifier::Parameter
99 Parameter(
size_t nClasses = 2) : daal::algorithms::classifier::Parameter(nClasses), resultsToCompute(computeClassesLabels) {}
100 Parameter(
const Parameter& o) : daal::algorithms::classifier::Parameter(o), resultsToCompute(o.resultsToCompute){}
101 DAAL_UINT64 resultsToCompute;
109 class DAAL_EXPORT Input :
public classifier::prediction::Input
111 typedef classifier::prediction::Input super;
114 Input(
const Input& other) : super(other){}
125 data_management::NumericTablePtr
get(classifier::prediction::NumericTableInputId id)
const;
132 logistic_regression::ModelPtr
get(classifier::prediction::ModelInputId id)
const;
139 void set(classifier::prediction::NumericTableInputId
id,
const data_management::NumericTablePtr &ptr);
146 void set(classifier::prediction::ModelInputId
id,
const logistic_regression::ModelPtr &ptr);
154 services::Status check(
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
161 class DAAL_EXPORT Result :
public algorithms::classifier::prediction::Result
164 DECLARE_SERIALIZABLE_CAST(Result)
172 data_management::NumericTablePtr
get(classifier::prediction::ResultId id)
const;
179 void set(classifier::prediction::ResultId
id,
const data_management::NumericTablePtr &value);
186 data_management::NumericTablePtr
get(ResultNumericTableId id)
const;
193 void set(ResultNumericTableId
id,
const data_management::NumericTablePtr &value);
202 template <
typename algorithmFPType>
203 DAAL_EXPORT services::Status allocate(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *par,
const int method);
212 services::Status check(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *par,
int method)
const DAAL_C11_OVERRIDE;
216 template<
typename Archive,
bool onDeserialize>
217 services::Status serialImpl(Archive *arch)
219 return daal::algorithms::classifier::prediction::Result::serialImpl<Archive, onDeserialize>(arch);
222 typedef services::SharedPtr<Result> ResultPtr;
223 typedef services::SharedPtr<const Result> ResultConstPtr;
226 using interface1::Parameter;
227 using interface1::Input;
228 using interface1::Result;
229 using interface1::ResultPtr;
230 using interface1::ResultConstPtr;
236 #endif // __LOGISTIC_REGRESSION_PREDICT_TYPES_H__
daal::algorithms::logistic_regression::prediction::logProbabilities
Definition: logistic_regression_predict_types.h:77
daal
Definition: algorithm_base_common.h:31
daal::algorithms::classifier::prediction::ModelInputId
ModelInputId
Definition: classifier_predict_types.h:64
daal::algorithms::classifier::prediction::NumericTableInputId
NumericTableInputId
Definition: classifier_predict_types.h:53
daal::algorithms::logistic_regression::prediction::defaultDense
Definition: logistic_regression_predict_types.h:53
daal::algorithms::logistic_regression::prediction::interface1::Result
Provides interface for the result of model-based prediction.
Definition: logistic_regression_predict_types.h:161
daal::algorithms::logistic_regression::prediction::probabilities
Definition: logistic_regression_predict_types.h:73
daal::algorithms::logistic_regression::prediction::ResultToComputeId
ResultToComputeId
Definition: logistic_regression_predict_types.h:60
daal::algorithms::logistic_regression::prediction::Method
Method
Definition: logistic_regression_predict_types.h:51
daal::algorithms::logistic_regression::prediction::ResultNumericTableId
ResultNumericTableId
Definition: logistic_regression_predict_types.h:71
daal::algorithms::classifier::prediction::prediction
Definition: classifier_predict_types.h:76
daal::algorithms::classifier::prediction::ResultId
ResultId
Definition: classifier_predict_types.h:74
daal::algorithms::math::abs::value
Definition: abs_types.h:86
daal::algorithms::logistic_regression::prediction::interface1::Parameter::resultsToCompute
DAAL_UINT64 resultsToCompute
Definition: logistic_regression_predict_types.h:101
daal::algorithms::logistic_regression::prediction::interface1::Parameter
Parameters of the prediction algorithm.
Definition: logistic_regression_predict_types.h:97