2
0
Fork 0
This commit is contained in:
Daniel Kapla 2019-08-25 16:51:37 +02:00
parent 16e03fad3c
commit a796a38799
1 changed files with 5 additions and 2 deletions

View File

@ -7,6 +7,9 @@
// > sourceCpp('runtime_tests_grad.cpp')
//
// // #define ARMA_DONT_USE_WRAPPER
// #define ARMA_DONT_USE_BLAS
// [[Rcpp::depends(RcppArmadillo)]]
#include <RcppArmadillo.h>
#include <math.h>
@ -102,7 +105,7 @@ arma::mat grad(const arma::mat& X,
}
}
// weighted first, secend order responce means `y1`, `y2`
// weighted first, second order responce means `y1`, `y2`
// and component wise Loss `L(i) = L_n(V, X_i)`
vec y1(n);
vec y2(n);
@ -376,7 +379,7 @@ setup.tests <- function () {
}
mbm <- microbenchmark(
arma = arma_grad(X, X_diff, Y, Y_rep, V, h),
grad = grad(Xt, Y, V, h),
# grad = grad(Xt, Y, V, h),
grad_p = grad_p(Xt, Y, V, h),
check = comp.all,
setup = setup.tests(),