![]() |
Belle II Software
release-08-02-04
|
Class to invoke a pretrained python estimator that follows the sklearn interface. More...
#include <PyEstimator.h>

Public Member Functions | |
| PyEstimator (const std::string &pickleFileName) | |
| Construct the Estimator. More... | |
| double | predict (const std::vector< double > &inputVariables) |
| Call the predict method of the estimator. | |
| double | predict (const std::vector< NamedFloatTuple * > &floatTuples) |
| Call the predict method of the estimator. | |
| double | predict (boost::python::object &array) |
| Call the predict method of the estimator. | |
Private Member Functions | |
| void | unpickleEstimator (const std::string &pickleFileName) |
| Load the estimator object from the pickled file. | |
| void | expand (size_t nVars) |
| Reserves space for at least n variable in the input array. | |
Private Attributes | |
| std::string | m_pickleFileName |
| File name of the pickle file that contains the trained estimator. | |
| boost::python::object | m_estimator |
| Retrained python estimator object. | |
| boost::python::object | m_predict |
| Python bound prediction method - cached to avoid repeated lookup. | |
| boost::python::object | m_array |
| Array to be served to the estimator. | |
| size_t | m_nCurrent = 0 |
| Cache for the current length of the input array. | |
| bool | m_is_binary_classification = false |
| Internal flag to keep track whether a binary classification with predict_proba is evaluated. | |
Class to invoke a pretrained python estimator that follows the sklearn interface.
Definition at line 23 of file PyEstimator.h.
|
explicit |
Construct the Estimator.
| pickleFileName | Name of the file that contains the pickled estimator object eg from sklearn |
Definition at line 22 of file PyEstimator.cc.