|
| IndexedDesignMatrix (DesignMatrix< VarType > const &designMatrix, size_t const indicesColumnIndex, string const indexName="index", vector< string > const &columnNames=vector< string >(0)) |
| Build an IndexedDesignMatrix from given DesignMatrix and specified indices column. More...
|
|
| IndexedDesignMatrix (DesignMatrix< VarType > const &designMatrix, vector< IndexType > const &indices, string const indexName="index", vector< string > const &columnNames=vector< string >(0)) |
| Build an IndexedDesignMatrix from given DesignMatrix and indices vector. More...
|
|
| IndexedDesignMatrix (arma::Mat< VarType > const &X, size_t const indicesColumnIndex, string const indexName="index", vector< string > const &columnNames=vector< string >(0)) |
| Build an IndexedDesignMatrix from given \(X\) matrix and specified indices column. More...
|
|
| IndexedDesignMatrix (arma::Mat< VarType > const &X, vector< IndexType > const &indices, string const indexName="index", vector< string > const &columnNames=vector< string >(0)) |
| Build an IndexedDesignMatrix from given DesignMatrix \(X\) and indices. More...
|
|
| IndexedDesignMatrix (string const &path, string const indexName="index") |
| Build an IndexedDesignMatrix from data in file at given path and specified index column. More...
|
|
IndexType & | operator[] (size_t const i) |
| Access to the \(i\)-th index. More...
|
|
DiffDesignMatrix< double, VarType > | toLinearTimeDiffDesignMatrix (double const ta=0.0, double const tb=1.0, DiffDesignMatrixType diffType=DiffDesignMatrixType::FORWARD_FINITE_DIFFERENCES) const |
| Build a DiffDesignMatrix from the IndexedDesignMatrix assuming that the index 0 lies at \(t_a\) while the maximum index lies at \(t_b\). All \(m\) indices are expected to be linearly spaced with a step \(\Delta t = \frac{t_b - t_a}{m}\). More...
|
|
shared_ptr< DiffDesignMatrix< double, VarType > > | toLinearTimeDiffDesignMatrixPointer (double const ta=0.0, double const tb=1.0, DiffDesignMatrixType diffType=DiffDesignMatrixType::FORWARD_FINITE_DIFFERENCES) const |
|
void | mergeInPlace (DesignMatrix< VarType > const &dm) override |
| Extend DesignMatrix::mergeInPlace method so the indices are also merged. More...
|
|
vector< IndexType > const & | getIndices () const |
| Obtain a constant/read reference to the vector of indices. More...
|
|
string const | getIndexName () const |
| Obtain the name of the index attribute. More...
|
|
void | setIndexName (string const &indexName) |
| Set the name of the index attribute. More...
|
|
| DesignMatrix (vector< string > const &columnNames=vector< string >(0)) |
| Build a DesignMatrix with no data. More...
|
|
| DesignMatrix (arma::Mat< VarType > const &X, vector< string > const &columnNames=vector< string >(0)) |
| Build a DesignMatrix from given armadillo matrix. More...
|
|
| DesignMatrix (string const &path, string const &sep=",") |
| Build a DesignMatrix from data in file at given path. More...
|
|
VarType & | operator() (size_t const i, size_t const j) override |
| Access to the \(x_{ij}\) component of the \(X\) design matrix. More...
|
|
virtual void | mergeInPlace (DesignMatrix const &dm) |
| Merge given DesignMatrix into this DesignMatrix. More...
|
|
void | swapColumns (vector< long unsigned int > const &indices) |
|
void | swapColumns (vector< unsigned long long > const &indices) |
|
void | swapColumns (arma::uvec const &indices) |
| Swap the columns of the DesignMatrix. More...
|
|
void | dropColumns (vector< long unsigned int > const &indices) |
|
void | dropColumns (vector< unsigned long long > const &indices) |
|
void | dropColumns (arma::uvec const &indices) |
| Remove the columns from the DesignMatrix. More...
|
|
void | dropRows (vector< long unsigned int > const &indices) |
|
void | dropRows (vector< unsigned long long > const &indices) |
|
virtual void | dropRows (arma::uvec const &indices) |
| Remove the rows from the DesignMatrix. More...
|
|
void | addToColumn (size_t const colIdx, VarType const x) |
| Add \(x\) to all elements of \(j\)-th column. More...
|
|
arma::Mat< VarType > const & | getX () const |
| Obtain a constant/read reference to the \(X\) matrix. More...
|
|
arma::Mat< VarType > & | getWritableX () |
| Obtain a writable reference to the \(X\) matrix. More...
|
|
size_t | getNumRows () const override |
| Obtain the number of rows of the DesignMatrix \(X\). More...
|
|
size_t | getNumColumns () const override |
| Obtain the number of columns of the DesignMatrix \(X\). More...
|
|
size_t | getNumElements () const override |
| Obtain the number of elements of the DesignMatrix \(X\). More...
|
|
arma::subview_row< VarType > const | getRow (size_t const i) const |
| Obtain the \(i\)-th row of the DesignMatrix \(X\). More...
|
|
arma::Row< VarType > | getRowCopy (size_t const i) const |
| Like DesignMatrix::getRow(size_t const) but returning a copy by value instead of a view-like reference. More...
|
|
arma::subview_col< VarType > const | getColumn (size_t const j) const |
| Obtain the \(j\)-th column of the DesignMatrix \(X\). More...
|
|
arma::subview_col< VarType > const | getColumn (string const &columnName) const |
| Like the fluxionum::DesignMatrix::getColumn(size_t const) method but specifying the column by name. More...
|
|
arma::Col< VarType > | getColumnCopy (size_t const j) const |
| Like DesignMatrix::getColumn(size_t const) but returning a copy by value instead of a view-like reference. More...
|
|
arma::Col< VarType > | getColumnCopy (string const &columnName) const |
| Like DesignMatrix::getColumn(string const &) but returning a copy by value instead of a view-like reference. More...
|
|
void | setColumn (size_t const j, arma::Col< VarType > const &col) |
| Set the \(j\)-th column of the DesignMatrix \(X\). More...
|
|
| AbstractDesignMatrix (vector< string > const &columnNames=vector< string >(0)) |
| Default constructor for the AbstractDesignMatrix. More...
|
|
VarType & | operator() (size_t const i, string const columnName) |
| Like the AbstractDesignMatrix::operator()(size_t const, size_t const) method but specifying the column by its name instead of its index. More...
|
|
bool | hasColumnNames () const |
| Check whether there are available column names for the AbstractDesignMatrix (true) or not (false) More...
|
|
string const & | getColumnName (size_t const j) const |
| Obtain the name of the \(j\)-th column. More...
|
|
void | setColumnName (size_t const j, string const &columnName) |
| Set the name of the \(j\)-th column. More...
|
|
vector< string > const & | getColumnNames () const |
| Obtain a constant/read reference to the column names. More...
|
|
void | setColumnNames (vector< string > const &columnNames) |
| Obtain a constant/read reference to the column names. More...
|
|
template<typename IndexType, typename VarType>
class fluxionum::IndexedDesignMatrix< IndexType, VarType >
- Author
- Alberto M. Esmoris Pena
- Version
- 1.0
An indexed design matrix is simply a matrix which values are ordered by its indices so it is known that the \(i\)-th row precedes the \(i+1\) row. It can be seen as the discrete version of a temporal design matrix.
Obtaining a DiffDesignMatrix from an IndexedDesignMatrix is not possible without an assumption about the time domain. For instance, it can be assumed that indices are linearly spaced inside a normalized time interval \(t \in [0, 1]\). However, this assumption must accurately pair with the reality of data. Otherwise, the generated DiffDesignMatrix will be wrong. It is also possible that there is no useful time domain interpretation for the indices, thus there might be some IndexedDesignMatrix for which it is not possible to have a corresponding DiffDesignMatrix.
- Template Parameters
-
IndexType | The type of index or index domain |
VarType | The non index domain (basic DesignMatrix domain) |
- See also
- fluxionum::TemporalDesignMatrix
-
fluxionum::DiffDesignMatrix
-
fluxionum::DesignMatrix