Yosokumo::Predictor Class Reference

A column of values, an independent variable. More...

#include <Predictor.h>

List of all members.

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.
Predictoroperator= (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

Detailed Description

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:

Author:
Roger House
Version:
0.9

Definition at line 28 of file Predictor.h.


Member Enumeration Documentation

Indicates the level of measurement for the feature.

The default value is RATIO.

Enumerator:
NOMINAL 

the values are names or labels for certain characteristics, without any implied order among them.

ORDINAL 

the feature takes values that represent the rank order of the specimen, but the distance between the values is not meaningful.

INTERVAL 

the predictor values can be ranked and have a standard unit of measurement, but the zero value is arbitrary.

RATIO 

The values taken by the predictor have a standard unit of measurement, are rankable, and the zero value is non-arbitrary.

Definition at line 72 of file Predictor.h.

Provides a logical delete facility.

The default value is ACTIVE.

Enumerator:
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.

Enumerator:
CATEGORICAL 

the feature takes on discrete values.

CONTINUOUS 

the feature may take any real value.

Definition at line 56 of file Predictor.h.


Constructor & Destructor Documentation

Predictor::Predictor (  ) 

Default constructor - initializes a newly created Predictor object with default attributes.

  • name 1
  • status ACTIVE
  • type CONTINUOUS
  • level RATIO

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.

  • status ACTIVE
  • type CONTINUOUS
  • level RATIO
Parameters:
name the name of the predictor.

Definition at line 13 of file Predictor.cpp.

References ACTIVE, CONTINUOUS, initPredictor(), and RATIO.

Predictor::Predictor ( int64_t  name,
Status  status,
Type  type,
Level  level 
)

Initializes a newly created Predictor object with attributes specified by the input parameters.

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.

Parameters:
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.


Member Function Documentation

Predictor::Level Predictor::getLevel (  )  const

Return the predictor level.

Returns:
the level of this predictor.

Definition at line 119 of file Predictor.cpp.

Referenced by Yosokumo::YosokumoProtobuf::makeProtobufPredictorFromPredictor(), and toString().

int64_t Predictor::getPredictorName (  )  const

Return the predictor name.

Returns:
the name of this predictor, which is the unique identification of the predictor.

Definition at line 86 of file Predictor.cpp.

Referenced by Yosokumo::YosokumoProtobuf::makeProtobufPredictorFromPredictor(), and toString().

Predictor::Status Predictor::getStatus (  )  const

Return the predictor status.

Returns:
the status of this predictor.

Definition at line 97 of file Predictor.cpp.

Referenced by Yosokumo::YosokumoProtobuf::makeProtobufPredictorFromPredictor(), and toString().

Predictor::Type Predictor::getType (  )  const

Return the predictor type.

Returns:
the type of this predictor.

Definition at line 108 of file Predictor.cpp.

Referenced by Yosokumo::YosokumoProtobuf::makeProtobufPredictorFromPredictor(), and toString().

void Predictor::initPredictor ( int64_t  name,
Status  status,
Type  type,
Level  level 
) [private]

Initializes a Predictor object with attributes specified by the input parameters.

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.

Parameters:
rhs the righthand side of the inequality.
Returns:
true if and only if this Predictors and the righthand side Predictors are not identically equal.

Definition at line 72 of file Predictor.cpp.

Predictor & Predictor::operator= ( const Predictor rhs  ) 

Assignment operator - assign one Predictor to another.

Parameters:
rhs the righthand side of the assignment.
Returns:
a reference to this Predictor.

Definition at line 37 of file Predictor.cpp.

References initPredictor(), level, name, status, and type.

bool Predictor::operator== ( const Predictor rhs  )  const

Equality operator - compare two Predictors for equality.

Parameters:
rhs the righthand side of the equality.
Returns:
true if and only if this Predictors and the righthand side Predictors are identically equal.

Definition at line 61 of file Predictor.cpp.

References level, name, status, and type.

void Predictor::setLevel ( Level  L  ) 

Set the predictor level.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Returns:
the string representation of this Predictor.

Definition at line 127 of file Predictor.cpp.

References getLevel(), getPredictorName(), getStatus(), and getType().

Referenced by Yosokumo::operator<<().


Member Data Documentation

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().

Definition at line 99 of file Predictor.h.

Referenced by operator=(), operator==(), and Predictor().

Definition at line 100 of file Predictor.h.

Referenced by operator=(), operator==(), and Predictor().


The documentation for this class was generated from the following files:
Generated on Mon May 13 09:19:12 2013 for C++ Yosokumo API by  doxygen 1.6.3