xiaooupan / conquer Goto Github PK
View Code? Open in Web Editor NEWConvolution-type Smoothed Quantile Regression
Convolution-type Smoothed Quantile Regression
Hi,
I'm running into an error compiling conquer. Is there an easy fix I'm missing? See error report below.
ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0'
ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [conquer.so] Error 1
ERROR: compilation failed for package ‘conquer’
There is a dependency to {caret} that installs a lot of unwanted packages in cascade. The dependency is just for using its createFolds()
function. The way it is used, (folds = createFolds(Y, kfolds, FALSE)
, line 385 in smqr.R, it seems that it could be replaced by something like:
len <- length(Y)
folds <- sample(rep(1:kfolds, ceiling(len/kfolds)), len))
This way, you could get rid of the dependency to {caret} and get a cleaner installation.
Is it possible to relax the minimum version to Depends: R (>= 3.5.0)
? Your package is a new Imports
for quantreg
and I was hoping to continue to use the newest quantreg
for R 3.5.3.
The package cannot build on macOs mojave. The compiler uses the -openmp switch, which is not available on stock Apple llvm
R version 3.5.0
install.packages("conquer")
Installing package into ‘/Users/luohao/Dropbox/bioinformatic_documents/R/R_lib’
(as ‘lib’ is unspecified)
Package which is only available in source form, and may need compilation of C/C++/Fortran:
‘conquer’
Do you want to attempt to install these from sources? (Yes/no/cancel) Yes
installing the source package ‘conquer’
downloaded 23 KB
This is a great package but a limitation that I am finding is that it builds the quantile regression models with intercept. An option for the estimation of the models without the intercept would be (I think) a good feature to add. This is something that other regression-related packages like glmnet or, in the field of quantile regression, quantreg, implement.
A direct call of install.package("conquer") in R had the following output:
g++-std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I"/home/santos/.R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include" -I"/home/santos/.R/x86_64-pc-linux-gnu-library/3.6/RcppArmadillo/include" -fopenmp -fpic -g -O2 -fdebug-prefix-map=/build/r-base-V28x5H/r-base-3.6.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c smqr.cpp -o smqr.o
smqr.cpp: In function ‘Rcpp::List smqrGauss(const mat&, arma::vec, double, double, double, double, int)’:
smqr.cpp:143:35: error: ‘quantile’ is not a member of ‘arma’
beta(0) = arma::as_scalar(arma::quantile(Y - Z.cols(1, p) * beta.rows(1, p), quant));
^~~~~~~~
smqr.cpp: In function ‘Rcpp::List smqrGaussNsd(const mat&, const vec&, double, double, double, double, int)’:
smqr.cpp:187:35: error: ‘quantile’ is not a member of ‘arma’
beta(0) = arma::as_scalar(arma::quantile(Y - Z.cols(1, p) * beta.rows(1, p), quant));
^~~~~~~~
smqr.cpp: In function ‘Rcpp::List smqrUnif(const mat&, arma::vec, double, double, double, double, int)’:
smqr.cpp:280:35: error: ‘quantile’ is not a member of ‘arma’
beta(0) = arma::as_scalar(arma::quantile(Y - Z.cols(1, p) * beta.rows(1, p), quant));
^~~~~~~~
smqr.cpp: In function ‘Rcpp::List smqrUnifNsd(const mat&, const vec&, double, double, double, double, int)’:
smqr.cpp:324:35: error: ‘quantile’ is not a member of ‘arma’
beta(0) = arma::as_scalar(arma::quantile(Y - Z.cols(1, p) * beta.rows(1, p), quant));
^~~~~~~~
smqr.cpp: In function ‘Rcpp::List smqrPara(const mat&, arma::vec, double, double, double, double, int)’:
smqr.cpp:417:35: error: ‘quantile’ is not a member of ‘arma’
beta(0) = arma::as_scalar(arma::quantile(Y - Z.cols(1, p) * beta.rows(1, p), quant));
^~~~~~~~
smqr.cpp: In function ‘Rcpp::List smqrParaNsd(const mat&, const vec&, double, double, double, double, int)’:
smqr.cpp:461:35: error: ‘quantile’ is not a member of ‘arma’
beta(0) = arma::as_scalar(arma::quantile(Y - Z.cols(1, p) * beta.rows(1, p), quant));
^~~~~~~~
smqr.cpp: In function ‘Rcpp::List smqrTrian(const mat&, arma::vec, double, double, double, double, int)’:
smqr.cpp:554:35: error: ‘quantile’ is not a member of ‘arma’
beta(0) = arma::as_scalar(arma::quantile(Y - Z.cols(1, p) * beta.rows(1, p), quant));
^~~~~~~~
smqr.cpp: In function ‘Rcpp::List smqrTrianNsd(const mat&, const vec&, double, double, double, double, int)’:
smqr.cpp:598:35: error: ‘quantile’ is not a member of ‘arma’
beta(0) = arma::as_scalar(arma::quantile(Y - Z.cols(1, p) * beta.rows(1, p), quant));
^~~~~~~~
/usr/lib/R/etc/Makeconf:177: recipe for target 'smqr.o' failed
make: *** [smqr.o] Error 1
ERROR: compilation failed for package ‘conquer’
* removing ‘/home/santos/.R/x86_64-pc-linux-gnu-library/3.6/conquer’`
Could you guys explain what happened? Thanks in advance.
I'm running R 3.6.3 in a Ubuntu 18.04.4 LTS
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.