fastglmm
Massively scalable generalized linear mixed models
Loading...
Searching...
No Matches
fastglmmLib::spectralDecomp< T > Class Template Reference

#include <spectralDecomp.h>

Public Member Functions

 spectralDecomp ()
 spectralDecomp (const T &U, const vec &s, const ZTYPE &type=GENERAL)
 spectralDecomp (const T &Z, const ZTYPE &type=GENERAL)
 spectralDecomp (const spectralDecomp &other)
void reweight (const vec &weights, const bool &sort=false)
get_U () const
vec get_s () const
mat get_V () const
ZTYPE get_type () const

Protected Attributes

U
vec s
Z
Zw
mat V
ZTYPE type

Detailed Description

template<typename T>
class fastglmmLib::spectralDecomp< T >

Class storing matrix Z, its squared singular values (s), left singular vectors (U), and right singular vectors (V). Z can be mat or sp_mat. Default type is GENERAL for arbitrary matrix Z. If Z is a categorical design matrix, use a faster method with type CATEGORICAL.

reweight() computes the SVD of the weighted Z matrix

Constructor & Destructor Documentation

◆ spectralDecomp() [1/4]

template<typename T>
fastglmmLib::spectralDecomp< T >::spectralDecomp ( )
inline

◆ spectralDecomp() [2/4]

template<typename T>
fastglmmLib::spectralDecomp< T >::spectralDecomp ( const T & U,
const vec & s,
const ZTYPE & type = GENERAL )
inline

Constructor

Parameters
Uleft singular vectors
ssquared singular values

◆ spectralDecomp() [3/4]

template<typename T>
fastglmmLib::spectralDecomp< T >::spectralDecomp ( const T & Z,
const ZTYPE & type = GENERAL )
inline

Constructor

Parameters
ZRandom effects design matrix

◆ spectralDecomp() [4/4]

template<typename T>
fastglmmLib::spectralDecomp< T >::spectralDecomp ( const spectralDecomp< T > & other)
inline

Member Function Documentation

◆ get_s()

template<typename T>
vec fastglmmLib::spectralDecomp< T >::get_s ( ) const
inline

Accessor, returns squared singular values

◆ get_type()

template<typename T>
ZTYPE fastglmmLib::spectralDecomp< T >::get_type ( ) const
inline

◆ get_U()

template<typename T>
T fastglmmLib::spectralDecomp< T >::get_U ( ) const
inline

Accessor, returns left singular vectors

◆ get_V()

template<typename T>
mat fastglmmLib::spectralDecomp< T >::get_V ( ) const
inline

Accessor, returns right singular values

◆ reweight()

template<typename T>
void fastglmmLib::spectralDecomp< T >::reweight ( const vec & weights,
const bool & sort = false )
inline

Compute spectral decomp of weighted Z.

Parameters
weightsrow weights
sortshould singular values and vectors be sorted

Member Data Documentation

◆ s

template<typename T>
vec fastglmmLib::spectralDecomp< T >::s
protected

◆ type

template<typename T>
ZTYPE fastglmmLib::spectralDecomp< T >::type
protected

◆ U

template<typename T>
T fastglmmLib::spectralDecomp< T >::U
protected

◆ V

template<typename T>
mat fastglmmLib::spectralDecomp< T >::V
protected

◆ Z

template<typename T>
T fastglmmLib::spectralDecomp< T >::Z
protected

◆ Zw

template<typename T>
T fastglmmLib::spectralDecomp< T >::Zw
protected

The documentation for this class was generated from the following file: