![]() |
Ultra 0.9.4
|
#include <oracle.h>
Public Member Functions | |
| basic_binary_oracle (const I &, const dataframe &, std::vector< std::string >={}) | |
| basic_binary_oracle (std::istream &, const symbol_set &) | |
| classification_result | tag (const std::vector< value_t > &) const final |
| bool | is_valid () const final |
| bool | save (std::ostream &) const final |
| Public Member Functions inherited from ultra::src::basic_class_oracle | |
| 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. | |
Static Public Attributes | |
| static const std::string | SERIALIZE_ID |
Additional Inherited Members | |
| Protected Member Functions inherited from ultra::src::basic_class_oracle | |
| 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 inherited from ultra::src::basic_class_oracle | |
| static std::vector< std::string > | class_names (const dataframe &) |
| Collects the class names from the training set. | |
Oracle for Binary Classification.
| I | individual |
| S | stores the individual inside vs keep a reference only |
This class transforms individuals into oracles that can be used for binary classification tasks.
| basic_binary_oracle::basic_binary_oracle | ( | const I & | ind, |
| const dataframe & | d, | ||
| std::vector< std::string > | names = {} ) |
| [in] | ind | individual "to be transformed" into an oracle |
| [in] | d | the training set |
| [in] | names | optional class names |
| basic_binary_oracle::basic_binary_oracle | ( | std::istream & | in, |
| const symbol_set & | ss ) |
Constructs the object reading data from an input stream.
| [in] | in | input stream |
| [in] | ss | active symbol set |
|
nodiscardfinalvirtual |
Implements ultra::src::basic_oracle.
|
finalvirtual |
Saves the oracle on persistent storage.
| [out] | out | output stream |
Implements ultra::src::basic_oracle.
|
nodiscardfinalvirtual |
| [in] | ex | input example for the lambda function |
Implements ultra::src::basic_oracle.