TommyJones / mvrsquared
Showing 1 of 2 files from the diff.
Other files ignored by Codecov

@@ -10,9 +10,9 @@
Loading
10 10
// [[Rcpp::export]]
11 11
NumericVector calc_sum_squares_latent(
12 12
    arma::sp_mat Y,
13 -
    NumericMatrix X,
14 -
    NumericMatrix W,
15 -
    NumericVector ybar,
13 +
    arma::mat X,
14 +
    arma::mat W,
15 +
    arma::vec ybar,
16 16
    int threads
17 17
) {
18 18
@@ -22,6 +22,9 @@
Loading
22 22
  double SST = 0; // total sum of squares across all documents
23 23
24 24
25 +
  // convert R equivalent classes to arma classes
26 +
27 +
25 28
  // for each observations...
26 29
  RcppThread::parallelFor(
27 30
    0,
@@ -39,10 +42,10 @@
Loading
39 42
      double sse = 0;
40 43
      double sst = 0;
41 44
42 -
      for(int v = 0; v < W.ncol(); v++ ){
45 +
      for(int v = 0; v < W.n_cols; v++ ){
43 46
        double Yhat = 0;
44 47
45 -
        for(int k = 0; k < X.ncol(); k++ ){
48 +
        for(int k = 0; k < X.n_cols; k++ ){
46 49
          Yhat = Yhat + X(d , k ) * W(k , v );
47 50
        }
48 51
Files Coverage
R/calc_rsquared.R 97.87%
src/calc_sum_squares_latent.cpp 100.00%
Project Totals (2 files) 98.28%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading