mlpack
3.4.2
mlpack-3.4.2
src
mlpack
core
data
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
19
namespace
mlpack
{
20
namespace
data {
21
32
template
<
typename
RowType,
typename
MatType>
33
void
OneHotEncoding
(
const
RowType& labelsIn,
34
MatType& output);
35
45
template
<
typename
eT>
46
void
OneHotEncoding
(
const
arma::Mat<eT>& input,
47
const
arma::Col<size_t>& indices,
48
arma::Mat<eT>& output);
49
60
template
<
typename
eT>
61
void
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
prereqs.hpp
The core includes that mlpack expects; standard C++ includes and Armadillo.
mlpack::data::OneHotEncoding
void OneHotEncoding(const RowType &labelsIn, MatType &output)
Given a set of labels of a particular datatype, convert them to binary vector.
mlpack
Linear algebra utility functions, generally performed on matrices or vectors.
Definition:
add_to_cli11.hpp:21
core.hpp
Include all of the base components required to write mlpack methods, and the main mlpack Doxygen docu...
mlpack::data::DatasetMapper
Auxiliary information for a dataset, including mappings to/from strings (or other types) and the data...
Definition:
dataset_mapper.hpp:42
Generated by
1.8.20