PLearn 0.1
Public Member Functions | Protected Member Functions | Protected Attributes
PLearn::SDBVMField Class Reference

#include <SDBVMat.h>

Inheritance diagram for PLearn::SDBVMField:
Inheritance graph
[legend]
Collaboration diagram for PLearn::SDBVMField:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SDBVMField (real missing_values_mapping=MISSING_VALUE, VMField::FieldType field_type=VMField::UnknownType)
 Constructor: specifies the mapping for missing values.
virtual void convertField (const SDBWithStats &sdb, const Row &theRow, const Vec &outputField) const =0
virtual int fieldWidth () const =0
 Width that the field occupies in the VMat.
VMField::FieldType fieldType () const
bool isContinuous () const
bool isDiscrGeneral () const
bool isDiscrMonotonic () const
bool isDiscrFloat () const
bool isDate () const
virtual SDBVMOutputCoding getOutputCoding () const

Protected Member Functions

void convertMissing (const Vec &output) const
 Replace all MISSING_VALUEs in output vector by missing_values_mapping_.

Protected Attributes

real missing_values_mapping_
VMField::FieldType field_type_

Detailed Description

Base class for preprocessing SDB==>VMatrix

This class provides basic functionality for handling generic functional transformation between SimpleDB field(s) and VMatrix segments. (A segment is defined as a part of a VMatrix row, consisting of one or more columns).

Definition at line 152 of file SDBVMat.h.


Constructor & Destructor Documentation

PLearn::SDBVMField::SDBVMField ( real  missing_values_mapping = MISSING_VALUE,
VMField::FieldType  field_type = VMField::UnknownType 
) [inline]

Constructor: specifies the mapping for missing values.

Definition at line 156 of file SDBVMat.h.

        : missing_values_mapping_(missing_values_mapping),
          field_type_(field_type) {}

Member Function Documentation

virtual void PLearn::SDBVMField::convertField ( const SDBWithStats sdb,
const Row theRow,
const Vec outputField 
) const [pure virtual]
void PLearn::SDBVMField::convertMissing ( const Vec output) const [protected]
VMField::FieldType PLearn::SDBVMField::fieldType ( ) const [inline]

Query the kind of mapping performed by each field DiscrGeneral: arbitrary discrete values DiscrMonotonic: monotonic discrete values DiscrFloat: monotonic + some exceptions

Definition at line 177 of file SDBVMat.h.

Referenced by PLearn::SDBVMatrix::appendField().

{ return field_type_; }

Here is the caller graph for this function:

virtual int PLearn::SDBVMField::fieldWidth ( ) const [pure virtual]
SDBVMOutputCoding PLearn::SDBVMField::getOutputCoding ( ) const [virtual]

Reimplemented in PLearn::SDBVMFieldDiscrete.

Definition at line 280 of file SDBVMat.cc.

References PLearn::SDBVMUnknownCoding.

{
    return SDBVMUnknownCoding;
}
bool PLearn::SDBVMField::isContinuous ( ) const [inline]

Definition at line 179 of file SDBVMat.h.

References PLearn::VMField::Continuous.

bool PLearn::SDBVMField::isDate ( ) const [inline]

Definition at line 183 of file SDBVMat.h.

References PLearn::VMField::Date.

{ return field_type_ == VMField::Date; }
bool PLearn::SDBVMField::isDiscrFloat ( ) const [inline]

Definition at line 182 of file SDBVMat.h.

References PLearn::VMField::DiscrFloat.

bool PLearn::SDBVMField::isDiscrGeneral ( ) const [inline]

Definition at line 180 of file SDBVMat.h.

References PLearn::VMField::DiscrGeneral.

bool PLearn::SDBVMField::isDiscrMonotonic ( ) const [inline]

Definition at line 181 of file SDBVMat.h.

References PLearn::VMField::DiscrMonotonic.


Member Data Documentation

Definition at line 193 of file SDBVMat.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines