#include <SDBVMat.h>
Inheritance diagram for PLearn::SDBVMFieldRemapStrings:
Public Member Functions | |
SDBVMFieldRemapStrings (SDBVMSource source, const string &mappings, real other_values_mapping=MISSING_VALUE, real missing_values_mapping=MISSING_VALUE, SDBVMOutputCoding oc=SDBVMNumeric, VMField::FieldType ft=VMField::DiscrGeneral) | |
This constructor accepts an explicitly-specified mappings string. | |
SDBVMFieldRemapStrings (SDBVMSource source, const FieldStat &field_stat, real other_values_mapping=MISSING_VALUE, real missing_values_mapping=MISSING_VALUE, SDBVMOutputCoding oc=SDBVMNumeric, VMField::FieldType ft=VMField::DiscrGeneral) | |
virtual real | getDiscreteValue (const SDBWithStats &sdb, const Row &row) const |
Perform the actual remapping. | |
Static Public Member Functions | |
StringMap | getStringMapping (const string &mappings) |
This parses the remapping string and returns a map. | |
Protected Attributes | |
StringMap | string_mapping_ |
real | other_values_mapping_ |
Private Types | |
typedef SDBVMFieldDiscrete | inherited |
typedef map< string, real > | StringMap |
Definition at line 768 of file SDBVMat.h.
|
Reimplemented from PLearn::SDBVMFieldDiscrete. Definition at line 770 of file SDBVMat.h. Referenced by SDBVMFieldRemapStrings(). |
|
Definition at line 771 of file SDBVMat.h. Referenced by getStringMapping(). |
|
This constructor accepts an explicitly-specified mappings string.
Definition at line 761 of file SDBVMat.cc. References inherited, and string_mapping_. |
|
This constructor accepts mappings coming from a FieldStat. Note that the "hasmissing" field of the FieldStat is not automatically taken into account, and you must provide a missing_values_mapping here by yourself. The mapping is not modified in any way by the presence of missing values. Definition at line 776 of file SDBVMat.cc. References string_mapping_, and PLearn::FieldStat::symbolid. |
|
Perform the actual remapping.
Implements PLearn::SDBVMFieldDiscrete. Definition at line 795 of file SDBVMat.cc. References PLearn::SDBVMSource::getValue(), PLearn::FieldValue::isMissing(), other_values_mapping_, PLearn::space_to_underscore(), and string_mapping_. |
|
This parses the remapping string and returns a map. The maximum target value in the map is set into the last (reference) argument. Definition at line 742 of file SDBVMat.cc. References StringMap. |
|
Definition at line 804 of file SDBVMat.h. Referenced by getDiscreteValue(). |
|
Definition at line 803 of file SDBVMat.h. Referenced by getDiscreteValue(), and SDBVMFieldRemapStrings(). |