16 #ifndef __MLPACK_CORE_DATA_DATASET_INFO_HPP
17 #define __MLPACK_CORE_DATA_DATASET_INFO_HPP
20 #include <unordered_map>
21 #include <boost/bimap.hpp>
64 size_t MapString(
const std::string&
string,
const size_t dimension);
66 const std::string&
UnmapString(
const size_t value,
const size_t dimension);
75 template<
typename Archive>
86 std::unordered_map<size_t, std::pair<boost::bimap<std::string, size_t>,
94 #include "dataset_info_impl.hpp"
std::unordered_map< size_t, std::pair< boost::bimap< std::string, size_t >, size_t > > maps
DatasetInfo(const size_t dimensionality=0)
Create the DatasetInfo object with the given dimensionality.
Linear algebra utility functions, generally performed on matrices or vectors.
FirstShim< T > CreateNVP(T &t, const std::string &name, typename boost::enable_if< HasSerialize< T >>::type *=0)
Call this function to produce a name-value pair; this is similar to BOOST_SERIALIZATION_NVP(), but should be used for types that have a Serialize() function (or contain a type that has a Serialize() function) instead of a serialize() function.
Datatype
The Datatype enum specifies the types of data mlpack algorithms can use.
Auxiliary information for a dataset, including mappings to/from strings and the datatype of each dime...
Include all of the base components required to write MLPACK methods, and the main MLPACK Doxygen docu...
size_t MapString(const std::string &string, const size_t dimension)
Given the string and the dimension to which it belongs, return its numeric mapping.
void Serialize(Archive &ar, const unsigned int)
const std::string & UnmapString(const size_t value, const size_t dimension)
Datatype Type(const size_t dimension) const
size_t Dimensionality() const
std::vector< Datatype > types
size_t NumMappings(const size_t dimension) const