![]() |
Ultra 0.9.4
|
#include <oracle.h>
Public Member Functions | |
| value_t | operator() (const std::vector< value_t > &) const final |
| Returns the predicted class label. | |
| std::string | name (const value_t &) const final |
| Returns the class name, falling back to a numeric name for unknown IDs. | |
| Public Member Functions inherited from ultra::src::basic_oracle | |
| virtual bool | is_valid () const =0 |
| virtual classification_result | tag (const std::vector< value_t > &) const =0 |
Protected Member Functions | |
| basic_class_oracle (std::vector< std::string >={}) | |
| bool | load_names (std::istream &) |
| Loads the class names, accepting a zero count for omitted names. | |
| bool | save_names (std::ostream &) const |
| Saves a count followed by one class name per line. | |
Static Protected Member Functions | |
| static std::vector< std::string > | class_names (const dataframe &) |
| Collects the class names from the training set. | |
The basic interface of a classification oracle.
This class:
|
explicitprotected |
Constructs a classifier with optional class names.
| [in] | names | class names, or an empty vector for numeric names |
|
nodiscardfinalvirtual |
Returns the class name, falling back to a numeric name for unknown IDs.
Implements ultra::src::basic_oracle.
|
nodiscardfinalvirtual |
Returns the predicted class label.
Implements ultra::src::basic_oracle.