|
mlpack
master
|
Randomized SVD is a matrix factorization that is based on randomized matrix approximation techniques, developed in in "Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions". More...
Public Member Functions | |
| RandomizedSVD (const arma::mat &data, arma::mat &u, arma::vec &s, arma::mat &v, const size_t iteratedPower=0, const size_t maxIterations=2, const size_t rank=0, const double eps=1e-7) | |
| Create object for the randomized SVD method. More... | |
| RandomizedSVD (const size_t iteratedPower=0, const size_t maxIterations=2, const double eps=1e-7) | |
| Create object for the randomized SVD method. More... | |
| void | Apply (const arma::mat &data, arma::mat &u, arma::vec &s, arma::mat &v, const size_t rank) |
| Apply Principal Component Analysis to the provided data set using the randomized SVD. More... | |
| double | Epsilon () const |
| Get the value used for decomposition stability. More... | |
| double & | Epsilon () |
| Modify the value used for decomposition stability. More... | |
| size_t | IteratedPower () const |
| Get the size of the normalized power iterations. More... | |
| size_t & | IteratedPower () |
| Modify the size of the normalized power iterations. More... | |
| size_t | MaxIterations () const |
| Get the number of iterations for the power method. More... | |
| size_t & | MaxIterations () |
| Modify the number of iterations for the power method. More... | |
Private Attributes | |
| double | eps |
| The value used for numerical stability. More... | |
| size_t | iteratedPower |
| Locally stored size of the normalized power iterations. More... | |
| size_t | maxIterations |
| Locally stored number of iterations for the power method. More... | |
Randomized SVD is a matrix factorization that is based on randomized matrix approximation techniques, developed in in "Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions".
For more information, see the following.
An example of how to use the interface is shown below:
Definition at line 66 of file randomized_svd.hpp.
| mlpack::svd::RandomizedSVD::RandomizedSVD | ( | const arma::mat & | data, |
| arma::mat & | u, | ||
| arma::vec & | s, | ||
| arma::mat & | v, | ||
| const size_t | iteratedPower = 0, |
||
| const size_t | maxIterations = 2, |
||
| const size_t | rank = 0, |
||
| const double | eps = 1e-7 |
||
| ) |
Create object for the randomized SVD method.
| data | Data matrix. |
| u | First unitary matrix. |
| v | Second unitary matrix. |
| sigma | Diagonal matrix of singular values. |
| iteratedPower | Size of the normalized power iterations (Default: rank + 2). |
| maxIterations | Number of iterations for the power method (Default: 2). |
| rank | Rank of the approximation (Default: number of rows.) |
| eps | The eps coefficient to avoid division by zero (numerical stability). |
| mlpack::svd::RandomizedSVD::RandomizedSVD | ( | const size_t | iteratedPower = 0, |
| const size_t | maxIterations = 2, |
||
| const double | eps = 1e-7 |
||
| ) |
Create object for the randomized SVD method.
| iteratedPower | Size of the normalized power iterations (Default: rank + 2). |
| maxIterations | Number of iterations for the power method (Default: 2). |
| eps | The eps coefficient to avoid division by zero (numerical stability). |
| void mlpack::svd::RandomizedSVD::Apply | ( | const arma::mat & | data, |
| arma::mat & | u, | ||
| arma::vec & | s, | ||
| arma::mat & | v, | ||
| const size_t | rank | ||
| ) |
Apply Principal Component Analysis to the provided data set using the randomized SVD.
| data | Data matrix. |
| u | First unitary matrix. |
| v | Second unitary matrix. |
| sigma | Diagonal matrix of singular values. |
| rank | Rank of the approximation. |
Referenced by mlpack::pca::RandomizedSVDPolicy::Apply().
|
inline |
Get the value used for decomposition stability.
Definition at line 134 of file randomized_svd.hpp.
References eps.
|
inline |
Modify the value used for decomposition stability.
Definition at line 136 of file randomized_svd.hpp.
References eps.
|
inline |
Get the size of the normalized power iterations.
Definition at line 124 of file randomized_svd.hpp.
References iteratedPower.
|
inline |
Modify the size of the normalized power iterations.
Definition at line 126 of file randomized_svd.hpp.
References iteratedPower.
|
inline |
Get the number of iterations for the power method.
Definition at line 129 of file randomized_svd.hpp.
References maxIterations.
|
inline |
Modify the number of iterations for the power method.
Definition at line 131 of file randomized_svd.hpp.
References maxIterations.
|
private |
The value used for numerical stability.
Definition at line 146 of file randomized_svd.hpp.
Referenced by Epsilon().
|
private |
Locally stored size of the normalized power iterations.
Definition at line 140 of file randomized_svd.hpp.
Referenced by IteratedPower().
|
private |
Locally stored number of iterations for the power method.
Definition at line 143 of file randomized_svd.hpp.
Referenced by MaxIterations().
1.8.11