|using||MappedType = double|
|MissingPolicy (std::set< std::string > missingSet)|
|Create the MissingPolicy object with the given missingSet. More...|
|void||MapFirstPass (const std::string &, const size_t)|
|There is nothing for us to do here, but this is required by the MapPolicy type. More...|
|T||MapString (const std::string &string, const size_t dimension, MapType &maps, std::vector< Datatype > &)|
|Given the string and the dimension to which it belongs by the user, and the maps and types given by the DatasetMapper class, returns its numeric mapping. More...|
|static const bool||NeedsFirstPass = false|
|This doesn't need a first pass over the data to set up. More...|
It tells how the strings should be mapped. Purpose of this policy is to map all user-defined missing variables into maps so that users can decide what to do with the corrupted data. User-defined missing variables are given by the missingSet. Note that MissingPolicy does not change type of features.
Given the string and the dimension to which it belongs by the user, and the maps and types given by the DatasetMapper class, returns its numeric mapping.
If no mapping yet exists and the string is included in the missingSet, the string is added to the list of mappings for the given dimension. This function is used as a helper function for DatasetMapper class.
|MapType||Type of unordered_map that contains mapped value pairs|
|string||String to find/create mapping for.|
|dimension||Index of the dimension of the string.|
|maps||Unordered map given by the DatasetMapper.|
|*||(types) Vector containing the type information about each dimensions.|