Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

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.

References field_type_, and missing_values_mapping_.


Member Function Documentation

virtual void PLearn::SDBVMField::convertField const SDBWithStats sdb,
const Row theRow,
const Vec outputField
const [pure virtual]
 

Given a database row, convert the appropriate parts to a (preallocated) output vector of the correct width (given by fieldWidth). Replace MISSING_VALUEs by missing_values_mapping.

Implemented in PLearn::SDBVMFieldAsIs, PLearn::SDBVMFieldNormalize, PLearn::SDBVMFieldDivSigma, PLearn::SDBVMFieldAffine, PLearn::SDBVMFieldPosAffine, PLearn::SDBVMFieldSignedPower, PLearn::SDBVMFieldFunc1, PLearn::SDBVMFieldFunc2, PLearn::SDBVMFieldDate, PLearn::SDBVMFieldDay, PLearn::SDBVMFieldMonths, PLearn::SDBVMFieldDateDiff, PLearn::SDBVMFieldDiscrete, PLearn::SDBVMFieldDateGreater, PLearn::SDBVMFieldICBCTargets, and PLearn::SDBVMFieldICBCClassification.

void PLearn::SDBVMField::convertMissing const Vec output  )  const [protected]
 

Replace all MISSING_VALUEs in output vector by missing_values_mapping_.

Definition at line 285 of file SDBVMat.cc.

References PLearn::is_missing(), PLearn::TVec< T >::length(), missing_values_mapping_, and PLearn::Vec.

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.

References field_type_.

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

virtual int PLearn::SDBVMField::fieldWidth  )  const [pure virtual]
 

Width that the field occupies in the VMat.

Implemented in PLearn::SDBVMFieldAsIs, PLearn::SDBVMFieldNormalize, PLearn::SDBVMFieldDivSigma, PLearn::SDBVMFieldAffine, PLearn::SDBVMFieldPosAffine, PLearn::SDBVMFieldSignedPower, PLearn::SDBVMFieldFunc1, PLearn::SDBVMFieldFunc2, PLearn::SDBVMFieldDate, PLearn::SDBVMFieldDay, PLearn::SDBVMFieldMonths, PLearn::SDBVMFieldDateDiff, PLearn::SDBVMFieldDiscrete, PLearn::SDBVMFieldDateGreater, PLearn::SDBVMFieldICBCTargets, PLearn::SDBVMFieldHasClaim, PLearn::SDBVMFieldSumClaims, and PLearn::SDBVMFieldICBCClassification.

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

SDBVMOutputCoding PLearn::SDBVMField::getOutputCoding  )  const [virtual]
 

Reimplemented in PLearn::SDBVMFieldDiscrete.

Definition at line 280 of file SDBVMat.cc.

References PLearn::SDBVMUnknownCoding.

bool PLearn::SDBVMField::isContinuous  )  const [inline]
 

Definition at line 179 of file SDBVMat.h.

References field_type_.

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

Definition at line 183 of file SDBVMat.h.

References field_type_.

bool PLearn::SDBVMField::isDiscrFloat  )  const [inline]
 

Definition at line 182 of file SDBVMat.h.

References field_type_.

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

Definition at line 180 of file SDBVMat.h.

References field_type_.

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

Definition at line 181 of file SDBVMat.h.

References field_type_.


Member Data Documentation

VMField::FieldType PLearn::SDBVMField::field_type_ [protected]
 

Definition at line 193 of file SDBVMat.h.

Referenced by fieldType(), isContinuous(), isDate(), isDiscrFloat(), isDiscrGeneral(), isDiscrMonotonic(), and SDBVMField().

real PLearn::SDBVMField::missing_values_mapping_ [protected]
 

Definition at line 192 of file SDBVMat.h.

Referenced by convertMissing(), and SDBVMField().


The documentation for this class was generated from the following files:
Generated on Tue Aug 17 16:22:48 2004 for PLearn by doxygen 1.3.7