|
OpenNN
Open-source neural networks library
|
Single dataset column descriptor: name, role, type, scaler, and optional categories. More...
#include <variable.h>
Public Member Functions | |
| Variable (const string &={}, const string &="None", const VariableType &=VariableType::Numeric, const string &="MeanStandardDeviation", const vector< string > &={}) | |
| Constructs a Variable with optional name, role, type, scaler and category list. | |
| void | set (const string &={}, const string &="None", const VariableType &=VariableType::Numeric, const string &="MeanStandardDeviation", const vector< string > &={}) |
| Resets the Variable fields to the supplied values. | |
| const string & | get_role () const |
| VariableRole | get_role_type () const |
| const string & | get_scaler () const |
| ScalerMethod | get_scaler_type () const |
| const string & | get_type_string () const |
| Returns the canonical string name of the Variable type. | |
| Index | get_categories_number () const |
| Returns the number of categories for categorical variables (zero otherwise). | |
| void | set_scaler (const string &new_scaler) |
| void | set_scaler (ScalerMethod new_scaler) |
| void | set_role (const string &new_role) |
| void | set_role (VariableRole new_role) |
| void | set_type (const string &) |
| Sets the Variable type from its canonical string name. | |
| void | set_categories (const vector< string > &new_categories) |
| void | from_JSON (const JsonDocument &) |
| Loads Variable fields from a JSON document. | |
| void | to_JSON (JsonWriter &) const |
| Writes Variable fields to a JSON writer. | |
| bool | is_binary () const |
| Returns true if the Variable type is Binary. | |
| bool | is_categorical () const |
| Returns true if the Variable type is Categorical. | |
| bool | is_used () const |
| Returns true if the Variable has an active role other than Time. | |
| Index | feature_count () const |
| Returns the number of features generated by this Variable (categories or one). | |
| vector< string > | get_names () const |
| Returns the expanded feature names (one per category for categorical variables). | |
Public Attributes | |
| string | name |
| VariableRole | role = VariableRole::None |
| VariableType | type = VariableType::None |
| vector< string > | categories |
| ScalerMethod | scaler = ScalerMethod::None |
Single dataset column descriptor: name, role, type, scaler, and optional categories.
| opennn::Variable::Variable | ( | const string & | = {}, |
| const string & | = "None", | ||
| const VariableType & | = VariableType::Numeric, | ||
| const string & | = "MeanStandardDeviation", | ||
| const vector< string > & | = {} ) |
Constructs a Variable with optional name, role, type, scaler and category list.
|
inline |
Returns the number of features generated by this Variable (categories or one).
| void opennn::Variable::from_JSON | ( | const JsonDocument & | ) |
Loads Variable fields from a JSON document.
| Index opennn::Variable::get_categories_number | ( | ) | const |
Returns the number of categories for categorical variables (zero otherwise).
| vector< string > opennn::Variable::get_names | ( | ) | const |
Returns the expanded feature names (one per category for categorical variables).
|
inline |
|
inline |
|
inline |
|
inline |
| const string & opennn::Variable::get_type_string | ( | ) | const |
Returns the canonical string name of the Variable type.
|
inline |
Returns true if the Variable type is Binary.
|
inline |
Returns true if the Variable type is Categorical.
|
inline |
Returns true if the Variable has an active role other than Time.
| void opennn::Variable::set | ( | const string & | = {}, |
| const string & | = "None", | ||
| const VariableType & | = VariableType::Numeric, | ||
| const string & | = "MeanStandardDeviation", | ||
| const vector< string > & | = {} ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void opennn::Variable::set_type | ( | const string & | ) |
Sets the Variable type from its canonical string name.
| void opennn::Variable::to_JSON | ( | JsonWriter & | ) | const |
Writes Variable fields to a JSON writer.
| vector<string> opennn::Variable::categories |
| string opennn::Variable::name |
| VariableRole opennn::Variable::role = VariableRole::None |
| ScalerMethod opennn::Variable::scaler = ScalerMethod::None |
| VariableType opennn::Variable::type = VariableType::None |