|
Turi Create
4.0
|
#include <model_server/lib/extensions/option_info.hpp>
Public Types | |
| enum | |
Public Member Functions | |
| flexible_type | to_dictionary () const |
| Export to dictionary. | |
| flexible_type | interpret_value (const flexible_type &value) const |
| void | check_value (const flexible_type &value) const |
| void | save (turi::oarchive &oarc) const |
| Serialization – save. | |
| void | load (turi::iarchive &iarc) |
| Serialization – load. | |
Public Attributes | |
| std::string | name |
| The name of the parameter. | |
| std::string | description |
| A short description of the parameter. | |
| flexible_type | default_value |
| The default value. | |
| enum turi::option_handling::option_info:: { ... } | parameter_type |
| flexible_type | lower_bound |
| If real, these specify the allowed range of the model. | |
| std::vector< flexible_type > | allowed_values |
| If categorical, this specifies the allowed values. | |
The primary structure for information regarding the possible parameters of the algorithm. The values passed into the model are checked against this information.
Definition at line 21 of file option_info.hpp.
| anonymous enum |
The type of the parameter. If REAL or CATEGORICAL, allowed values are specified in the parameters below. Integer behaves like REAL, but a warning is issued if the given value is not an integer. If BOOL, the specified value must translate to either 0 or 1. If COLUMN, then it must be a valid column in the data.
Definition at line 37 of file option_info.hpp.
| void turi::option_handling::option_info::check_value | ( | const flexible_type & | value | ) | const |
Validate a given option. If the option doesn't match up with what is specified, a string error is raised detailing what's wrong.
| flexible_type turi::option_handling::option_info::interpret_value | ( | const flexible_type & | value | ) | const |
Interpret a value according to the current options.
| enum { ... } turi::option_handling::option_info::parameter_type |
The type of the parameter. If REAL or CATEGORICAL, allowed values are specified in the parameters below. Integer behaves like REAL, but a warning is issued if the given value is not an integer. If BOOL, the specified value must translate to either 0 or 1. If COLUMN, then it must be a valid column in the data.