Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add weights to cv.biglasso #29

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

standardize_bm <- function(xP, row_idx_) {
.Call('biglasso_standardize_bm', PACKAGE = 'biglasso', xP, row_idx_)
.Call(`_biglasso_standardize_bm`, xP, row_idx_)
}

get_eta <- function(xP, row_idx_, beta, idx_p, idx_l) {
.Call('biglasso_get_eta', PACKAGE = 'biglasso', xP, row_idx_, beta, idx_p, idx_l)
.Call(`_biglasso_get_eta`, xP, row_idx_, beta, idx_p, idx_l)
}

1 change: 1 addition & 0 deletions R/cv.biglasso.R
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ cvf <- function(i, XX, y, eval.metric, cv.ind, cv.args, parallel= FALSE) {
cv.args$X <- XX
cv.args$y <- y
cv.args$row.idx <- which(cv.ind != i)
cv.args$weights <- cv.args$weights[cv.args$row.idx]
cv.args$warn <- FALSE
cv.args$ncores <- 1

Expand Down
4 changes: 2 additions & 2 deletions src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ using namespace Rcpp;

// standardize_bm
RcppExport SEXP standardize_bm(SEXP xP, SEXP row_idx_);
RcppExport SEXP biglasso_standardize_bm(SEXP xPSEXP, SEXP row_idx_SEXP) {
RcppExport SEXP _biglasso_standardize_bm(SEXP xPSEXP, SEXP row_idx_SEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Expand All @@ -20,7 +20,7 @@ END_RCPP
}
// get_eta
RcppExport SEXP get_eta(SEXP xP, SEXP row_idx_, SEXP beta, SEXP idx_p, SEXP idx_l);
RcppExport SEXP biglasso_get_eta(SEXP xPSEXP, SEXP row_idx_SEXP, SEXP betaSEXP, SEXP idx_pSEXP, SEXP idx_lSEXP) {
RcppExport SEXP _biglasso_get_eta(SEXP xPSEXP, SEXP row_idx_SEXP, SEXP betaSEXP, SEXP idx_pSEXP, SEXP idx_lSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Expand Down
4 changes: 2 additions & 2 deletions src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ extern SEXP cdfit_gaussian_hsr_bedpp_nac(SEXP X_, SEXP y_, SEXP row_idx_,
SEXP safe_thresh_,
SEXP verbose_);

extern SEXP biglasso_get_eta(SEXP xPSEXP, SEXP row_idx_SEXP, SEXP betaSEXP, SEXP idx_pSEXP, SEXP idx_lSEXP);
extern SEXP _biglasso_get_eta(SEXP xPSEXP, SEXP row_idx_SEXP, SEXP betaSEXP, SEXP idx_pSEXP, SEXP idx_lSEXP);

static R_CallMethodDef callMethods[] = {
{"cdfit_binomial_hsr", (DL_FUNC) &cdfit_binomial_hsr, 16},
Expand All @@ -162,7 +162,7 @@ static R_CallMethodDef callMethods[] = {
{"cdfit_gaussian_edpp", (DL_FUNC) &cdfit_gaussian_edpp, 14},
{"cdfit_gaussian_hsr_dome_nac", (DL_FUNC) &cdfit_gaussian_hsr_dome_nac, 16},
{"cdfit_gaussian_hsr_bedpp_nac", (DL_FUNC) &cdfit_gaussian_hsr_bedpp_nac, 16},
{"biglasso_get_eta", (DL_FUNC) &biglasso_get_eta, 5},
{"_biglasso_get_eta", (DL_FUNC) &_biglasso_get_eta, 5},
{NULL, NULL, 0}
};

Expand Down