13 #ifndef MLPACK_METHODS_NN_COLUMNS_TO_BLOCKS_HPP 14 #define MLPACK_METHODS_NN_COLUMNS_TO_BLOCKS_HPP 146 void Transform(
const arma::mat& maximalInputs, arma::mat& output);
191 void Rows(
const size_t value) { rows = value; }
196 void Cols(
const size_t value) { cols = value; }
size_t BlockHeight() const
Get the block height.
double minRange
The minimum of the range to be scaled to (if scaling is enabled).
bool IsPerfectSquare(size_t value) const
Determine whether or not the number is a perfect square.
double MaxRange() const
Get the maximum of the range the input will be scaled to, if scaling is enabled (see Scale())...
void MinRange(const double value)
Set the minimum of the range the input will be scaled to, if scaling is enabled (see Scale())...
Linear algebra utility functions, generally performed on matrices or vectors.
size_t Cols() const
Return the number of blocks per column.
double MinRange() const
Get the minimum of the range the input will be scaled to, if scaling is enabled (see Scale())...
The core includes that mlpack expects; standard C++ includes and Armadillo.
void Rows(const size_t value)
Set the number of blocks per row.
size_t blockHeight
The height of each block.
size_t cols
The number of blocks in each column.
double maxRange
The maximum of the range to be scaled to (if scaling is enabled).
ColumnsToBlocks(size_t rows, size_t cols, size_t blockHeight=0, size_t blockWidth=0)
Constructor a ColumnsToBlocks object with the given parameters.
void Transform(const arma::mat &maximalInputs, arma::mat &output)
Transform the columns of the input matrix into blocks.
double BufValue() const
Get the value used for buffer cells.
void MaxRange(const double value)
Set the maximum of the range the input will be scaled to, if scaling is enabled (see Scale())...
size_t Rows() const
Modify the number of blocks per row.
void Cols(const size_t value)
Set the number of blocks per column.
bool Scale() const
Get whether or not scaling is enabled (see also MaxRange() and MinRange()).
bool scale
Whether or not scaling is enabled.
size_t BlockWidth() const
Get the block width.
void BufValue(const double value)
Modify the value used for buffer cells; the default is -1.
void BlockHeight(const size_t value)
Set the height of each block; see the constructor for more details.
size_t blockWidth
The width of each block.
Transform the columns of the given matrix into a block format.
void BufSize(const size_t value)
Modify the buffer size (the size of the margin around each column of the input).
size_t bufSize
The size of the buffer around each block.
size_t rows
The number of blocks in each row.
double bufValue
The value of the buffer around each block.
void Scale(const bool value)
Set whether or not scaling is enabled (see also MaxRange() and MinRange()).
size_t BufSize() const
Get the buffer size.
void BlockWidth(size_t value)
Set the width of each block; see the constructor for more details.