==41432== Memcheck, a memory error detector ==41432== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==41432== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info ==41432== Command: /data/blackswan/ripley/R/R-devel-vg/bin/exec/R --vanilla ==41432== R Under development (unstable) (2019-01-18 r75994) -- "Unsuffered Consequences" Copyright (C) 2019 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > pkgname <- "rFTRLProximal" > source(file.path(R.home("share"), "R", "examples-header.R")) > options(warn = 1) > library('rFTRLProximal') > > base::assign(".oldSearch", base::search(), pos = 'CheckExEnv') > base::assign(".old_wd", base::getwd(), pos = 'CheckExEnv') > cleanEx() > nameEx("FTRLProx_Hashing") > ### * FTRLProx_Hashing > > flush(stderr()); flush(stdout()) > > ### Name: FTRLProx_Hashing > ### Title: Feature Hashing for FTRL-Proximal Model > ### Aliases: FTRLProx_Hashing > > ### ** Examples > > library(data.table) > library(FeatureHashing) > data(ipinyou) > m.train <- FTRLProx_Hashing(~ 0 + ., ipinyou.train[, -"IsClick", with = FALSE], + hash.size = 2^13, signed.hash = FALSE, verbose = TRUE) Feature Hashing: 0% 10 20 30 40 50 60 70 80 90 100% |----|----|----|----|----|----|----|----|----|----| *************************************************** > m.test <- FTRLProx_Hashing(~ 0 + ., ipinyou.test[,-"IsClick", with = FALSE], + hash.size = 2^13, signed.hash = FALSE, verbose = TRUE) Feature Hashing: 0% 10 20 30 40 50 60 70 80 90 100% |----|----|----|----|----|----|----|----|----|----| *************************************************** > > > > cleanEx() ==41432== Conditional jump or move depends on uninitialised value(s) ==41432== at 0x40320CB: ??? ==41432== by 0x20C26797: ??? ==41432== by 0x20C26797: ??? ==41432== by 0x20C267D7: ??? ==41432== by 0x1FFEFF310F: ??? ==41432== detaching ‘package:FeatureHashing’, ‘package:data.table’ > nameEx("FTRLProx_cv") > ### * FTRLProx_cv > > flush(stderr()); flush(stdout()) > > ### Name: FTRLProx_cv > ### Title: FTRL-Proximal Linear Model Cross Validation > ### Aliases: FTRLProx_cv > > ### ** Examples > > library(FeatureHashing) > library(data.table) > library(rBayesianOptimization) > library(MLmetrics) Attaching package: ‘MLmetrics’ ==41432== Conditional jump or move depends on uninitialised value(s) ==41432== at 0x4041BE1: ??? ==41432== by 0xBC72A5F: ??? ==41432== by 0xBC72A5F: ??? ==41432== by 0xBC72A65: ??? ==41432== by 0x1FFEFF466F: ??? ==41432== The following object is masked from ‘package:base’: Recall > data(ipinyou) > m.train <- FTRLProx_Hashing(~ 0 + ., ipinyou.train[,-"IsClick", with = FALSE], + hash.size = 2^13, signed.hash = FALSE, verbose = TRUE) Feature Hashing: 0% 10 20 30 40 50 60 70 80 90 100% |----|----|----|----|----|----|----|----|----|----| *************************************************** > ftrl_model_cv <- FTRLProx_cv(x = m.train, y = as.numeric(ipinyou.train$IsClick), + family = "binomial", + params = list(alpha = 0.01, beta = 0.1, l1 = 1.0, l2 = 1.0), + epoch = 10, + folds = KFold(as.numeric(ipinyou.train$IsClick), nfolds = 5), + eval = AUC) > > > > cleanEx() ==41432== Conditional jump or move depends on uninitialised value(s) ==41432== at 0x4041C03: ??? ==41432== by 0x1EB1D537: ??? ==41432== by 0x1EB1D537: ??? ==41432== by 0x1EB1D5B5: ??? ==41432== by 0x1FFEFF310F: ??? ==41432== detaching ‘package:MLmetrics’, ‘package:rBayesianOptimization’, ‘package:data.table’, ‘package:FeatureHashing’ > nameEx("FTRLProx_predict") > ### * FTRLProx_predict > > flush(stderr()); flush(stdout()) > > ### Name: FTRLProx_predict > ### Title: FTRL-Proximal Linear Model Predicting > ### Aliases: FTRLProx_predict > > ### ** Examples > > library(data.table) > library(FeatureHashing) > library(MLmetrics) Attaching package: ‘MLmetrics’ The following object is masked from ‘package:base’: Recall > data(ipinyou) > m.train <- FTRLProx_Hashing(~ 0 + ., ipinyou.train[, -"IsClick", with = FALSE], + hash.size = 2^13, signed.hash = FALSE, verbose = TRUE) Feature Hashing: 0% 10 20 30 40 50 60 70 80 90 100% |----|----|----|----|----|----|----|----|----|----| *************************************************** > m.test <- FTRLProx_Hashing(~ 0 + ., ipinyou.test[,-"IsClick", with = FALSE], + hash.size = 2^13, signed.hash = FALSE, verbose = TRUE) Feature Hashing: 0% 10 20 30 40 50 60 70 80 90 100% |----|----|----|----|----|----|----|----|----|----| *************************************************** > ftrl_model <- FTRLProx_train(m.train, y = as.numeric(ipinyou.train$IsClick), family = "binomial", + params = list(alpha = 0.01, beta = 0.1, l1 = 1.0, l2 = 1.0), + epoch = 10, verbose = TRUE) Model Computing: 0% 10 20 30 40 50 60 70 80 90 100% [----|----|----|----|----|----|----|----|----|----| **************************************************| > pred_ftrl <- FTRLProx_predict(ftrl_model, newx = m.test) > AUC(pred_ftrl, as.numeric(ipinyou.test$IsClick)) [1] 0.7292825 > > > > cleanEx() ==41432== Conditional jump or move depends on uninitialised value(s) ==41432== at 0x4041C03: ??? ==41432== by 0x272D7E67: ??? ==41432== by 0x272D7E67: ??? ==41432== by 0x272D7EC0: ??? ==41432== by 0x1FFEFF310F: ??? ==41432== detaching ‘package:MLmetrics’, ‘package:FeatureHashing’, ‘package:data.table’ > nameEx("FTRLProx_train") > ### * FTRLProx_train > > flush(stderr()); flush(stdout()) > > ### Name: FTRLProx_train > ### Title: FTRL-Proximal Linear Model Training > ### Aliases: FTRLProx_train > > ### ** Examples > > library(data.table) > library(FeatureHashing) > library(MLmetrics) Attaching package: ‘MLmetrics’ The following object is masked from ‘package:base’: Recall > data(ipinyou) > m.train <- FTRLProx_Hashing(~ 0 + ., ipinyou.train[, -"IsClick", with = FALSE], + hash.size = 2^13, signed.hash = FALSE, verbose = TRUE) Feature Hashing: 0% 10 20 30 40 50 60 70 80 90 100% |----|----|----|----|----|----|----|----|----|----| *************************************************** > m.test <- FTRLProx_Hashing(~ 0 + ., ipinyou.test[,-"IsClick", with = FALSE], + hash.size = 2^13, signed.hash = FALSE, verbose = TRUE) Feature Hashing: 0% 10 20 30 40 50 60 70 80 90 100% |----|----|----|----|----|----|----|----|----|----| *************************************************** > ftrl_model <- FTRLProx_train(m.train, y = as.numeric(ipinyou.train$IsClick), + family = "binomial", + params = list(alpha = 0.01, beta = 0.1, l1 = 1.0, l2 = 1.0), + epoch = 10, verbose = TRUE) Model Computing: 0% 10 20 30 40 50 60 70 80 90 100% [----|----|----|----|----|----|----|----|----|----| **************************************************| > ftrl_model_bagging <- FTRLProx_train(m.train, y = as.numeric(ipinyou.train$IsClick), + family = "binomial", + params = list(alpha = 0.01, beta = 0.1, l1 = 1.0, l2 = 1.0), + epoch = 10, bagging_seeds = 1:10, verbose = FALSE) Warning: executing %dopar% sequentially: no parallel backend registered ==41432== Invalid read of size 4 ==41432== at 0x461CD8: INTEGER_ELT (svn/R-devel/src/include/Rinlinedfuns.h:381) ==41432== by 0x461CD8: coerceToReal (svn/R-devel/src/main/coerce.c:582) ==41432== by 0x461CD8: Rf_coerceVector (svn/R-devel/src/main/coerce.c:1276) ==41432== by 0x461CD8: Rf_coerceVector (svn/R-devel/src/main/coerce.c:1175) ==41432== by 0x1849717E: SEXPREC* Rcpp::internal::basic_cast<14>(SEXPREC*) (R-devel/site-library/Rcpp/include/Rcpp/r_cast.h:66) ==41432== by 0x184A36D0: Vector (R-devel/site-library/Rcpp/include/Rcpp/vector/Vector.h:74) ==41432== by 0x184A36D0: Exporter (R-devel/site-library/Rcpp/include/Rcpp/internal/Exporter.h:31) ==41432== by 0x184A36D0: as > (R-devel/site-library/Rcpp/include/Rcpp/as.h:87) ==41432== by 0x184A36D0: as > (R-devel/site-library/Rcpp/include/Rcpp/as.h:152) ==41432== by 0x184A36D0: Weight_Update(double, double, double, double, Rcpp::Vector<14, Rcpp::PreserveStorage>, Rcpp::Vector<14, Rcpp::PreserveStorage>) (packages/tests-vg/rFTRLProximal/src/rFTRLProximal.cpp:23) ==41432== by 0x184A4F59: FTRLProx_train_spMatrix(arma::SpMat, Rcpp::Vector<14, Rcpp::PreserveStorage>, std::__cxx11::basic_string, std::allocator >, Rcpp::Vector<19, Rcpp::PreserveStorage>, int, bool) (packages/tests-vg/rFTRLProximal/src/rFTRLProximal.cpp:119) ==41432== by 0x18493CF7: rFTRLProximal_FTRLProx_train_spMatrix (packages/tests-vg/rFTRLProximal/src/RcppExports.cpp:34) ==41432== by 0x495A83: do_dotcall (svn/R-devel/src/main/dotcode.c:1252) ==41432== by 0x4C883F: bcEval (svn/R-devel/src/main/eval.c:6771) ==41432== by 0x4D86FF: Rf_eval (svn/R-devel/src/main/eval.c:620) ==41432== by 0x4DA2AE: R_execClosure (svn/R-devel/src/main/eval.c:1780) ==41432== by 0x4DB004: Rf_applyClosure (svn/R-devel/src/main/eval.c:1706) ==41432== by 0x4D1FA4: bcEval (svn/R-devel/src/main/eval.c:6739) ==41432== by 0x4D86FF: Rf_eval (svn/R-devel/src/main/eval.c:620) ==41432== Address 0x2945d578 is 4,456 bytes inside a block of size 7,960 alloc'd ==41432== at 0x4C2EE3B: malloc (/builddir/build/BUILD/valgrind-3.14.0/coregrind/m_replacemalloc/vg_replace_malloc.c:309) ==41432== by 0x50F770: GetNewPage (svn/R-devel/src/main/memory.c:924) ==41432== by 0x5112AC: Rf_allocVector3 (svn/R-devel/src/main/memory.c:2746) ==41432== by 0x184A3601: wrap_dispatch_importer__impl__prim >, int> (R-devel/site-library/Rcpp/include/Rcpp/internal/wrap.h:669) ==41432== by 0x184A3601: wrap_dispatch_importer__impl >, int> (R-devel/site-library/Rcpp/include/Rcpp/internal/wrap.h:694) ==41432== by 0x184A3601: wrap_dispatch_importer >, int> (R-devel/site-library/Rcpp/include/Rcpp/internal/wrap.h:720) ==41432== by 0x184A3601: wrap_dispatch_unknown_importable > > (R-devel/site-library/Rcpp/include/Rcpp/internal/wrap.h:796) ==41432== by 0x184A3601: wrap_dispatch > > (R-devel/site-library/Rcpp/include/Rcpp/internal/wrap.h:807) ==41432== by 0x184A3601: wrap > > (R-devel/site-library/Rcpp/include/Rcpp/internal/wrap_end.h:30) ==41432== by 0x184A3601: operator SEXP (R-devel/site-library/Rcpp/include/Rcpp/sugar/functions/sign.h:61) ==41432== by 0x184A3601: Weight_Update(double, double, double, double, Rcpp::Vector<14, Rcpp::PreserveStorage>, Rcpp::Vector<14, Rcpp::PreserveStorage>) (packages/tests-vg/rFTRLProximal/src/rFTRLProximal.cpp:23) ==41432== by 0x184A76B9: FTRLProx_validate_spMatrix(arma::SpMat, Rcpp::Vector<14, Rcpp::PreserveStorage>, std::__cxx11::basic_string, std::allocator >, Rcpp::Vector<19, Rcpp::PreserveStorage>, int, arma::SpMat, Rcpp::Vector<14, Rcpp::PreserveStorage>, Rcpp::Function_Impl, bool) (packages/tests-vg/rFTRLProximal/src/rFTRLProximal.cpp:202) ==41432== by 0x1849408D: rFTRLProximal_FTRLProx_validate_spMatrix (packages/tests-vg/rFTRLProximal/src/RcppExports.cpp:53) ==41432== by 0x49550F: R_doDotCall (svn/R-devel/src/main/dotcode.c:606) ==41432== by 0x495A83: do_dotcall (svn/R-devel/src/main/dotcode.c:1252) ==41432== by 0x4C883F: bcEval (svn/R-devel/src/main/eval.c:6771) ==41432== by 0x4D86FF: Rf_eval (svn/R-devel/src/main/eval.c:620) ==41432== by 0x4DA2AE: R_execClosure (svn/R-devel/src/main/eval.c:1780) ==41432== by 0x4DB004: Rf_applyClosure (svn/R-devel/src/main/eval.c:1706) ==41432== > pred_ftrl <- FTRLProx_predict(ftrl_model, newx = m.test) > pred_ftrl_bagging <- FTRLProx_predict(ftrl_model_bagging, newx = m.test) > AUC(pred_ftrl, as.numeric(ipinyou.test$IsClick)) [1] 0.7292825 > AUC(pred_ftrl_bagging, as.numeric(ipinyou.test$IsClick)) [1] 0.7100158 > > > > cleanEx() detaching ‘package:MLmetrics’, ‘package:FeatureHashing’, ‘package:data.table’ > nameEx("FTRLProx_validate") > ### * FTRLProx_validate > > flush(stderr()); flush(stdout()) > > ### Name: FTRLProx_validate > ### Title: FTRL-Proximal Linear Model Validation > ### Aliases: FTRLProx_validate > > ### ** Examples > > library(data.table) > library(FeatureHashing) > library(MLmetrics) Attaching package: ‘MLmetrics’ The following object is masked from ‘package:base’: Recall > data(ipinyou) > m.train <- FTRLProx_Hashing(~ 0 + ., ipinyou.train[, -"IsClick", with = FALSE], + hash.size = 2^13, signed.hash = FALSE, verbose = TRUE) Feature Hashing: 0% 10 20 30 40 50 60 70 80 90 100% |----|----|----|----|----|----|----|----|----|----| *************************************************** > m.test <- FTRLProx_Hashing(~ 0 + ., ipinyou.test[,-"IsClick", with = FALSE], + hash.size = 2^13, signed.hash = FALSE, verbose = TRUE) Feature Hashing: 0% 10 20 30 40 50 60 70 80 90 100% |----|----|----|----|----|----|----|----|----|----| *************************************************** > ftrl_model_val <- FTRLProx_validate(x = m.train, y = as.numeric(ipinyou.train$IsClick), + family = "binomial", + params = list(alpha = 0.01, beta = 0.1, l1 = 1.0, l2 = 1.0), + epoch = 20, + val_x = m.test, + val_y = as.numeric(ipinyou.test$IsClick), + eval = AUC, verbose = TRUE) [1] train: 0.532086 validation: 0.718064 [2] train: 0.624028 validation: 0.725609 [3] train: 0.664775 validation: 0.72952 [4] train: 0.693405 validation: 0.731042 [5] train: 0.715287 validation: 0.730942 [6] train: 0.733746 validation: 0.730173 [7] train: 0.748885 validation: 0.730899 [8] train: 0.762709 validation: 0.73059 [9] train: 0.774968 validation: 0.730008 [10] train: 0.786256 validation: 0.729282 [11] train: 0.796687 validation: 0.729107 [12] train: 0.80577 validation: 0.728205 [13] train: 0.814437 validation: 0.727056 [14] train: 0.822596 validation: 0.726022 [15] train: 0.830057 validation: 0.725031 [16] train: 0.837254 validation: 0.72381 [17] train: 0.843918 validation: 0.722919 [18] train: 0.849979 validation: 0.721777 [19] train: 0.855654 validation: 0.721051 [20] train: 0.861314 validation: 0.720125 > > > > ### *