Skip to main content

MLCore::ConvertedFeatures

MLCore::ConvertedFeatures

Result of converting a TensorData to arma::mat.

#include <FeatureConverter.hpp>

Public Attributes

Name
arma::mat matrix
The feature matrix in mlpack layout where features × observations (double).
std::vector< std::string > column_names
Column names from the original TensorData (one per feature / matrix row).
std::vector< std::size_t > valid_row_indices
Indices of original tensor rows that survived NaN/Inf dropping.
std::size_t rows_dropped
Number of rows dropped due to NaN/Inf (0 if drop_nan was false).
std::vector< double > zscore_means
Per-column mean values computed during z-score normalization.
std::vector< double > zscore_stds
Per-column standard deviation values computed during z-score normalization.

Public Attributes Documentation

variable matrix

arma::mat matrix;

The feature matrix in mlpack layout where features × observations (double).

Each column is one observation, each row is one feature. This is the transpose of the TensorData layout (rows × columns).

variable column_names

std::vector< std::string > column_names;

Column names from the original TensorData (one per feature / matrix row).

variable valid_row_indices

std::vector< std::size_t > valid_row_indices;

Indices of original tensor rows that survived NaN/Inf dropping.

Maps matrix column index → original tensor row index. If drop_nan was false, this is simply {0, 1, …, N-1}. Useful for mapping predictions back to time frames.

variable rows_dropped

std::size_t rows_dropped {0};

Number of rows dropped due to NaN/Inf (0 if drop_nan was false).

variable zscore_means

std::vector< double > zscore_means;

Per-column mean values computed during z-score normalization.

Empty if zscore_normalize was false. Size = number of features. Useful for normalizing prediction-time data with the same parameters.

variable zscore_stds

std::vector< double > zscore_stds;

Per-column standard deviation values computed during z-score normalization.

Empty if zscore_normalize was false. Size = number of features.


Updated on 2026-11-13 at 20:25:41 +0000