A column of values, an independent variable. More...
#include <Predictor.h>
Public Types | |
| enum | Status { ACTIVE, INACTIVE } |
Provides a logical delete facility. More... | |
| enum | Type { CATEGORICAL, CONTINUOUS } |
Describes the quality of the predictor and determines the statistical operations that can be performed on the feature. More... | |
| enum | Level { NOMINAL, ORDINAL, INTERVAL, RATIO } |
Indicates the level of measurement for the feature. More... | |
Public Member Functions | |
| Predictor () | |
Default constructor - initializes a newly created Predictor object with default attributes. | |
| Predictor (int64_t name) | |
Initializes a newly created Predictor object with default attributes. | |
| Predictor (int64_t name, Status status, Type type, Level level) | |
Initializes a newly created Predictor object with attributes specified by the input parameters. | |
| Predictor (const Predictor &rhs) | |
Copy constructor - initializes a newly created Predictor object with a copy of another Predictor object. | |
| virtual | ~Predictor () |
Destructor - destroy a Predictor object. | |
| Predictor & | operator= (const Predictor &rhs) |
Assignment operator - assign one Predictor to another. | |
| bool | operator== (const Predictor &rhs) const |
Equality operator - compare two Predictors for equality. | |
| bool | operator!= (const Predictor &rhs) const |
Inequality operator - compare two Predictors for inequality. | |
| void | setPredictorName (int64_t name) |
| Set the predictor name. | |
| int64_t | getPredictorName () const |
| Return the predictor name. | |
| void | setStatus (Status s) |
| Set the predictor status. | |
| Status | getStatus () const |
| Return the predictor status. | |
| void | setType (Type t) |
| Set the predictor type. | |
| Type | getType () const |
| Return the predictor type. | |
| void | setLevel (Level L) |
| Set the predictor level. | |
| Level | getLevel () const |
| Return the predictor level. | |
| std::string | toString () |
Return a string representation of this Predictor. | |
Private Member Functions | |
| void | initPredictor (int64_t name, Status status, Type type, Level level) |
Initializes a Predictor object with attributes specified by the input parameters. | |
Private Attributes | |
| int64_t | name |
| Status | status |
| Type | type |
| Level | level |
A column of values, an independent variable.
Other terminology that is sometimes used: An attribute or an input. These are the primary characteristics of a Predictor:
Definition at line 28 of file Predictor.h.
Indicates the level of measurement for the feature.
The default value is RATIO.
Definition at line 72 of file Predictor.h.
Provides a logical delete facility.
The default value is ACTIVE.
| ACTIVE |
the predictor is active, i.e., it should be considered when constructing the model. |
| INACTIVE |
the predictor is inactive, i.e., it should not be considered when constructing the model. |
Definition at line 36 of file Predictor.h.
Describes the quality of the predictor and determines the statistical operations that can be performed on the feature.
The default value is CONTINUOUS.
| CATEGORICAL |
the feature takes on discrete values. |
| CONTINUOUS |
the feature may take any real value. |
Definition at line 56 of file Predictor.h.
| Predictor::Predictor | ( | ) |
Default constructor - initializes a newly created Predictor object with default attributes.
Definition at line 8 of file Predictor.cpp.
References ACTIVE, CONTINUOUS, initPredictor(), and RATIO.
| Predictor::Predictor | ( | int64_t | name | ) |
Initializes a newly created Predictor object with default attributes.
| name | the name of the predictor. |
Definition at line 13 of file Predictor.cpp.
References ACTIVE, CONTINUOUS, initPredictor(), and RATIO.
Initializes a newly created Predictor object with attributes specified by the input parameters.
| name | the name of the predictor. | |
| status | the status of the predictor. | |
| type | the type of the predictor. | |
| level | the level of the predictor. |
Definition at line 19 of file Predictor.cpp.
| Predictor::Predictor | ( | const Predictor & | rhs | ) |
Copy constructor - initializes a newly created Predictor object with a copy of another Predictor object.
| rhs | the Predictor to make a copy of. |
Definition at line 29 of file Predictor.cpp.
References initPredictor(), level, name, status, and type.
| Predictor::~Predictor | ( | ) | [virtual] |
Destructor - destroy a Predictor object.
Definition at line 34 of file Predictor.cpp.
| Predictor::Level Predictor::getLevel | ( | ) | const |
Return the predictor level.
Definition at line 119 of file Predictor.cpp.
Referenced by Yosokumo::YosokumoProtobuf::makeProtobufPredictorFromPredictor(), and toString().
| int64_t Predictor::getPredictorName | ( | ) | const |
Return the predictor name.
Definition at line 86 of file Predictor.cpp.
Referenced by Yosokumo::YosokumoProtobuf::makeProtobufPredictorFromPredictor(), and toString().
| Predictor::Status Predictor::getStatus | ( | ) | const |
Return the predictor status.
Definition at line 97 of file Predictor.cpp.
Referenced by Yosokumo::YosokumoProtobuf::makeProtobufPredictorFromPredictor(), and toString().
| Predictor::Type Predictor::getType | ( | ) | const |
Return the predictor type.
Definition at line 108 of file Predictor.cpp.
Referenced by Yosokumo::YosokumoProtobuf::makeProtobufPredictorFromPredictor(), and toString().
Initializes a Predictor object with attributes specified by the input parameters.
| name | the name of the predictor. | |
| status | the status of the predictor. | |
| type | the type of the predictor. | |
| level | the level of the predictor. |
Definition at line 46 of file Predictor.cpp.
Referenced by operator=(), and Predictor().
| bool Predictor::operator!= | ( | const Predictor & | rhs | ) | const |
Inequality operator - compare two Predictors for inequality.
| rhs | the righthand side of the inequality. |
true if and only if this Predictors and the righthand side Predictors are not identically equal. Definition at line 72 of file Predictor.cpp.
Assignment operator - assign one Predictor to another.
| rhs | the righthand side of the assignment. |
this Predictor. Definition at line 37 of file Predictor.cpp.
References initPredictor(), level, name, status, and type.
| bool Predictor::operator== | ( | const Predictor & | rhs | ) | const |
| void Predictor::setLevel | ( | Level | L | ) |
Set the predictor level.
| L | the level to assign to this predictor. |
Definition at line 114 of file Predictor.cpp.
Referenced by Yosokumo::YosokumoProtobuf::makePredictorFromProtobufPredictor().
| void Predictor::setPredictorName | ( | int64_t | name | ) |
Set the predictor name.
| name | the name to assign to this predictor. This is the unique identification of the predictor. It must be positive. |
Definition at line 80 of file Predictor.cpp.
Referenced by Yosokumo::YosokumoProtobuf::makePredictorFromProtobufPredictor().
| void Predictor::setStatus | ( | Status | s | ) |
Set the predictor status.
| s | the status to assign to this predictor. |
Definition at line 92 of file Predictor.cpp.
Referenced by Yosokumo::YosokumoProtobuf::makePredictorFromProtobufPredictor().
| void Predictor::setType | ( | Type | t | ) |
Set the predictor type.
| t | the type to assign to this predictor. |
Definition at line 103 of file Predictor.cpp.
Referenced by Yosokumo::YosokumoProtobuf::makePredictorFromProtobufPredictor().
| std::string Predictor::toString | ( | ) |
Return a string representation of this Predictor.
Predictor. Definition at line 127 of file Predictor.cpp.
References getLevel(), getPredictorName(), getStatus(), and getType().
Referenced by Yosokumo::operator<<().
Level Yosokumo::Predictor::level [private] |
Definition at line 101 of file Predictor.h.
Referenced by operator=(), operator==(), and Predictor().
int64_t Yosokumo::Predictor::name [private] |
Definition at line 98 of file Predictor.h.
Referenced by operator=(), operator==(), and Predictor().
Status Yosokumo::Predictor::status [private] |
Definition at line 99 of file Predictor.h.
Referenced by operator=(), operator==(), and Predictor().
Type Yosokumo::Predictor::type [private] |
Definition at line 100 of file Predictor.h.
Referenced by operator=(), operator==(), and Predictor().
1.6.3