Linear Algebra

Misc

  • Packages
    • {sparsevctrs} - Sparse Vectors for Use in Data Frames or Tibbles
      • Sparse matrices are not great for data in general, or at least not until the very end, when mathematical calculations occur.
      • Some computational tools for calculations use sparse matrices, specifically the Matrix package and some modeling packages (e.g., xgboost, glmnet, etc.).
      • A sparse representation of data that allows us to use modern data manipulation interfaces, keeps memory overhead low, and can be efficiently converted to a more primitive matrix format so that we can let Matrix and other packages do what they do best.
    • {quickr} - R to Fortran Transpiler
      • Only atomic vectors, matrices, and array are currently supported: integer, double, logical, and complex.

      • The return value must be an atomic array (e.g., not a list)

      • Only a subset of R’s vocabulary is currently supported.

        #>  [1] !=        %%        %/%       &         &&        (         *        
        #>  [8] +         -         /         :         <         <-        <=       
        #> [15] =         ==        >         >=        Fortran   [         [<-      
        #> [22] ^         c         cat       cbind     character declare   double   
        #> [29] for       if        ifelse    integer   length    logical   matrix   
        #> [36] max       min       numeric   print     prod      raw       seq      
        #> [43] sum       which.max which.min {         |         ||

Resources

Matrix Multiplication

Matrix Algebra

  • An expected value equation (VC stands for variance-covariance in example) multiplied by a matrix, C.

    • C is factored out of an expected value as C
    • C is factored out of a transpose as CT

Factorization