mlpack 3.4.2
one_hot_encoding.hpp
Go to the documentation of this file.
1
13#ifndef MLPACK_CORE_DATA_ONE_HOT_ENCODING_HPP
14#define MLPACK_CORE_DATA_ONE_HOT_ENCODING_HPP
15
16#include <mlpack/prereqs.hpp>
17#include <mlpack/core.hpp>
18
19namespace mlpack {
20namespace data {
21
32template<typename RowType, typename MatType>
33void OneHotEncoding(const RowType& labelsIn,
34 MatType& output);
35
45template<typename eT>
46void OneHotEncoding(const arma::Mat<eT>& input,
47 const arma::Col<size_t>& indices,
48 arma::Mat<eT>& output);
49
60template<typename eT>
61void OneHotEncoding(const arma::Mat<eT>& input,
62 arma::Mat<eT>& output,
63 const data::DatasetInfo& datasetInfo);
64
65} // namespace data
66} // namespace mlpack
67
68// Include implementation.
69#include "one_hot_encoding_impl.hpp"
70
71#endif
Auxiliary information for a dataset, including mappings to/from strings (or other types) and the data...
Include all of the base components required to write mlpack methods, and the main mlpack Doxygen docu...
void OneHotEncoding(const RowType &labelsIn, MatType &output)
Given a set of labels of a particular datatype, convert them to binary vector.
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
The core includes that mlpack expects; standard C++ includes and Armadillo.