![]() |
fml
0.1-0
Fused Matrix Library
|
Statistics kernels. More...
Functions | |
| template<typename REAL > | |
| void | cor (cpumat< REAL > &x, cpumat< REAL > &cov) |
| Covariance. More... | |
| template<typename REAL > | |
| void | cor (cpumat< REAL > &x, cpumat< REAL > &y, cpumat< REAL > &cov) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename REAL > | |
| REAL | cor (const cpuvec< REAL > &x, const cpuvec< REAL > &y) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename REAL > | |
| void | cov (cpumat< REAL > &x, cpumat< REAL > &cov) |
| Covariance. More... | |
| template<typename REAL > | |
| void | cov (cpumat< REAL > &x, cpumat< REAL > &y, cpumat< REAL > &cov) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename REAL > | |
| REAL | cov (const cpuvec< REAL > &x, const cpuvec< REAL > &y) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename REAL > | |
| void | pca (const bool rm_mean, const bool rm_sd, cpumat< REAL > &x, cpuvec< REAL > &sdev, cpumat< REAL > &rot) |
| Principal components analysis. More... | |
| template<typename REAL > | |
| void | pca (const bool rm_mean, const bool rm_sd, cpumat< REAL > &x, cpuvec< REAL > &sdev) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename REAL > | |
| void | cor (gpumat< REAL > &x, gpumat< REAL > &cov) |
| Covariance. More... | |
| template<typename REAL > | |
| void | cor (gpumat< REAL > &x, gpumat< REAL > &y, gpumat< REAL > &cov) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename REAL > | |
| REAL | cor (const gpuvec< REAL > &x, const gpuvec< REAL > &y) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename REAL > | |
| void | cov (gpumat< REAL > &x, gpumat< REAL > &cov) |
| Covariance. More... | |
| template<typename REAL > | |
| void | cov (gpumat< REAL > &x, gpumat< REAL > &y, gpumat< REAL > &cov) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename REAL > | |
| REAL | cov (const gpuvec< REAL > &x, const gpuvec< REAL > &y) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename REAL > | |
| void | pca (const bool rm_mean, const bool rm_sd, gpumat< REAL > &x, gpuvec< REAL > &sdev, gpumat< REAL > &rot) |
| Principal components analysis. More... | |
| template<typename REAL > | |
| void | pca (const bool rm_mean, const bool rm_sd, gpumat< REAL > &x, gpuvec< REAL > &sdev) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename REAL > | |
| void | cor (mpimat< REAL > &x, mpimat< REAL > &cov) |
| Covariance. More... | |
| template<typename REAL > | |
| void | cor (mpimat< REAL > &x, mpimat< REAL > &y, mpimat< REAL > &cov) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename REAL > | |
| void | cov (mpimat< REAL > &x, mpimat< REAL > &cov) |
| Covariance. More... | |
| template<typename REAL > | |
| void | cov (mpimat< REAL > &x, mpimat< REAL > &y, mpimat< REAL > &cov) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename REAL > | |
| void | pca (const bool rm_mean, const bool rm_sd, mpimat< REAL > &x, cpuvec< REAL > &sdev, mpimat< REAL > &rot) |
| Principal components analysis. More... | |
| template<typename REAL > | |
| void | pca (const bool rm_mean, const bool rm_sd, mpimat< REAL > &x, cpuvec< REAL > &sdev) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Statistics kernels.
Covariance.
Computes the lower triangle of the Pearson correlation matrix. Centering is done in-place.
| [in,out] | x,y | Input data. For the matrix variants, data is mean-centered on return. |
| [out] | cov | The correlation matrix. |
Exceptions
In the matrix-matrix and vector-vector variants, if the object dimensions/sizes are non-conformable, a runtime_error exception is thrown.
| REAL | should be 'float' or 'double'. |
Covariance.
Computes the lower triangle of the Pearson correlation matrix. Centering is done in-place.
| [in,out] | x,y | Input data. For the matrix variants, data is mean-centered on return. |
| [out] | cov | The correlation matrix. |
Exceptions
In the matrix-matrix and vector-vector variants, if the object dimensions/sizes are non-conformable, a runtime_error exception is thrown.
| REAL | should be 'float' or 'double'. |
Covariance.
Computes the lower triangle of the Pearson correlation matrix. Centering is done in-place.
| [in,out] | x,y | Input data. For the matrix variants, data is mean-centered on return. |
| [out] | cov | The correlation matrix. |
Exceptions
In the matrix-matrix and vector-vector variants, if the object dimensions/sizes are non-conformable, a runtime_error exception is thrown.
| REAL | should be 'float' or 'double'. |
Covariance.
Computes the lower triangle of the variance-covariance matrix. Centering is done in-place.
| [in,out] | x,y | Input data. For the matrix variants, data is mean-centered on return. |
| [out] | cov | The covariance matrix. |
Exceptions
In the matrix-matrix and vector-vector variants, if the object dimensions/sizes are non-conformable, a runtime_error exception is thrown.
| REAL | should be 'float' or 'double'. |
Covariance.
Computes the lower triangle of the variance-covariance matrix. Centering is done in-place.
| [in,out] | x,y | Input data. For the matrix variants, data is mean-centered on return. |
| [out] | cov | The covariance matrix. |
Exceptions
In the matrix-matrix and vector-vector variants, if the object dimensions/sizes are non-conformable, a runtime_error exception is thrown.
| REAL | should be 'float' or 'double'. |
Covariance.
Computes the lower triangle of the variance-covariance matrix. Centering is done in-place.
| [in,out] | x,y | Input data. For the matrix variants, data is mean-centered on return. |
| [out] | cov | The covariance matrix. |
Exceptions
In the matrix-matrix and vector-vector variants, if the object dimensions/sizes are non-conformable, a runtime_error exception is thrown.
| REAL | should be 'float' or 'double'. |
| void fml::stats::pca | ( | const bool | rm_mean, |
| const bool | rm_sd, | ||
| cpumat< REAL > & | x, | ||
| cpuvec< REAL > & | sdev, | ||
| cpumat< REAL > & | rot | ||
| ) |
Principal components analysis.
| [in] | rm_mean,rm_sd | Should the column means/sds be removed? |
| [in,out] | x | Input data. Values are overwritten. |
| [out] | sdev | Standard deviations of the principal components. |
| [out] | rot | The variable loadings. |
Implementation Details
Uses linalg::svd().
Memory Allocations
If the dimensions of the outputs are inappropriately sized, they will automatically be re-allocated.
Exceptions
If a reallocation is triggered and fails, a bad_alloc exception will be thrown.
| REAL | should be 'float' or 'double'. |
| void fml::stats::pca | ( | const bool | rm_mean, |
| const bool | rm_sd, | ||
| gpumat< REAL > & | x, | ||
| gpuvec< REAL > & | sdev, | ||
| gpumat< REAL > & | rot | ||
| ) |
Principal components analysis.
| [in] | rm_mean,rm_sd | Should the column means/sds be removed? |
| [in,out] | x | Input data. Values are overwritten. |
| [out] | sdev | Standard deviations of the principal components. |
| [out] | rot | The variable loadings. |
Implementation Details
Uses linalg::svd().
Memory Allocations
If the dimensions of the outputs are inappropriately sized, they will automatically be re-allocated.
Exceptions
If a reallocation is triggered and fails, a bad_alloc exception will be thrown.
| REAL | should be 'float' or 'double'. |
| void fml::stats::pca | ( | const bool | rm_mean, |
| const bool | rm_sd, | ||
| mpimat< REAL > & | x, | ||
| cpuvec< REAL > & | sdev, | ||
| mpimat< REAL > & | rot | ||
| ) |
Principal components analysis.
| [in] | rm_mean,rm_sd | Should the column means/sds be removed? |
| [in,out] | x | Input data. Values are overwritten. |
| [out] | sdev | Standard deviations of the principal components. |
| [out] | rot | The variable loadings. |
Implementation Details
Uses linalg::svd().
Memory Allocations
If the dimensions of the outputs are inappropriately sized, they will automatically be re-allocated.
Exceptions
If a reallocation is triggered and fails, a bad_alloc exception will be thrown.
| REAL | should be 'float' or 'double'. |