![]() |
Ultra 0.9.4
|
#include <oracle.h>
Public Member Functions | |
| reg_oracle_adaptor (O) | |
| value_t | operator() (const std::vector< value_t > &) const override |
| bool | is_valid () const override |
| std::string | name (const value_t &v) const override |
Adapts a regression predictor to the basic_oracle interface.
| O | predictor type |
This adaptor allows any user-defined regression predictor to be used as a basic_oracle. The wrapped predictor must satisfy RegressionPredictor, i.e. be callable with an input example and return a value_t.
|
explicit |
| [in] | oracle | predictor instance to adapt |
|
inlinenodiscardoverridevirtual |
This adaptor does not impose additional validity constraints beyond those of the underlying predictor, therefore it always returns true.
Implements ultra::src::basic_oracle.
|
nodiscardoverridevirtual |
Returns a string representation of the predicted value.
| [in] | v | numeric prediction |
Implements ultra::src::basic_oracle.
|
nodiscardoverridevirtual |
Returns the predicted value for the input example.
| [in] | x | input example |
This function forwards the call to the underlying regression predictor.
Implements ultra::src::basic_oracle.