similar to: lbfgsb from C/C++

Displaying 20 results from an estimated 400 matches similar to: "lbfgsb from C/C++"

2000 Aug 15
1
Defective pointer to tech report (PR#634)
Full_Name: Rod Montgomery Version: 1.1.0 OS: Windows-95 Submission from: (NULL) (38.26.56.3) File R-1.1.0/src/appl/lbfgsb.c -- Comment in code says two papers describing underlying math are in ftp://ece.nwu.edu/pub/lbfgs/lbfgs_bcm/ but that directory seems not to exist. (Actually, the comment does not give a URL - it just says to look in that directory on that FTP server.) Paper [1] does
2013 Oct 09
1
Version of L-BFGS-B used in optim etc
Hi. I just noticed the paper by Morales and Nocedal Remark on "Algorithm 778: L-BFGS-B: Fortran Subroutines for Large-Scale Bound Constrained Optimization". TOMS 2011; 38(1): 7 http://www.ece.northwestern.edu/~morales/PSfiles/acm-remark.pdf which describes a couple of improvements (speed and accuracy) to the original Netlib code which AFAICT is that still used by optim() via f2c.
2016 Oct 08
4
optim(…, method=‘L-BFGS-B’) stops with an error message while violating the lower bound
Hi, Mark et al.: Thanks, Mark. Three comments: 1. Rvmmin was one of the methods I tried after Ravi directed me to optimx. It returned NAs for essentially everything. See my email of this subject stamped 4:43 PM Central time = 21:43 UTC. 2. It would be interesting to know if the current algorithm behind optim and optimx with
2008 Mar 07
1
parameters for lbfgsb (function for optimization)
Can anyone help me with lbfgsb (function for optimization)? It takes the following parameters: void lbfgsb (int n, int lmm, double *x, double *lower, double *upper, int *nbd, double *Fmin, optimfn fn, optimgr gr, int *fail, void *ex, double factr, double pgtol, int *fncount, int *grcount, int maxit, char *msg, int trace, int nREPORT); What do I put for parameter ex (11th parameter)? I looked at
2004 Jun 30
1
AS_NUMERIC and as.numeric - Could someone explain?
Dear List, I stepped into a strange effect which I can't explain to myself (probably due to lack of knowledge on R internals). I have four vectors a,b,c and z of size 10000 each. With these vectors I call .Call("hyp2f1forrey", a, b, b, z, PACKAGE = "hyp2f1") to access SEXP hyp2f1forrey(SEXP a, SEXP b, SEXP c, SEXP x) { int i,n; double *xa, *xb, *xc, *xx,
2004 Feb 11
1
.Call setAttrib(ans,R_DimSymbol,dim); Crashes.
Hi! I want to return a matrix. The code does the R interfacing. This version does it fine. SEXP ans,dim; PROTECT(ans = NEW_NUMERIC(count*2)); memcpy(NUMERIC_POINTER(ans),result,count*sizeof(double)); memcpy(&(NUMERIC_POINTER(ans)[count]),occur,count*sizeof(double)); /** PROTECT(dim=NEW_INTEGER(2)); INTEGER_POINTER(dim)[0]=2; INTEGER_POINTER(dim)[1]=count;
2010 Jun 15
1
Error when callin g C-Code
Hi when I call the function below in R, i get the error: Object 'pairlist' can't be converted to 'double'. #include <R.h> #include <Rdefines.h> #include <Rmath.h> SEXP CSimPoisson(SEXP lambda, SEXP tgrid, SEXP T2M, SEXP Ni, SEXP NT) { double sign, EVar; double *xlambda, *xtgrid, *xT2M, *xNi, *xNT, *xtau; SEXP tau; int ltgrid =0; int i = 0; int j = 0;
2012 Oct 28
0
lbfgsb from C
Hi, I wanted to use R's lbfgsb method for minimization from C. Unfortunately, my toy examples always crashes (segmentation fault). What's wrong with it? double eval(int n, double* par, void *ex) { double result = 0; for (int i=0; i<n; ++i) { result += par[i]*par[i]; } printf("result=%.2f\n", result); return result; } void grad(int n, double *par, double *gr,
2013 Aug 27
1
Error in simulation. NAN
Hi all, im triyng to implement a bayesian model with R and c++. I have a strange problem. I can't reproduce the error with a small script and then i post the original one. The problem is after the line for(MCMC_iter2=0;MCMC_iter2<thin;MCMC_iter2++) For the first 34 iterations all work fine, after, all the simulations of mu_acc_P return an "nan". If i delete the line
2020 May 04
0
Error in message printed by lbfgsb
Hi I have a FORTRAN version of the L-BFGS-B algorithm and I was comparing it to the code in the lbfgsb.c file available at R-4.0.0.tar.gz Everithing looks the same, except for those two lines that must be printed by the prn3lb function in case of an error (lines 3559 and 3561 in lbfgsb.c): case -5: Rprintf("l(%d) > u(%d). No feasible solution", k, k); break; case -7:
2010 Aug 13
2
How to compare the effect of a variable across regression models?
Hello, I would like, if it is possible, to compare the effect of a variable across regression models. I have looked around but I haven't found anything. Maybe someone could help? Here is the problem: I am studying the effect of a variable (age) on an outcome (local recurrence: lr). I have built 3 models: - model 1: lr ~ age y = \beta_(a1).age - model 2: lr ~ age + presentation
2010 Jun 18
3
C interface
Greetings, I am trying to call simple C-code from R. I am on Windows XP with RTools installed. The C-function is #include <R.h> #include <Rinternals.h> #include <Rmath.h> #include <Rdefines.h> // prevent name mangling extern "C" { SEXP __cdecl test(SEXP s){ SEXP result; PROTECT(result = NEW_NUMERIC(1)); double* ptr=NUMERIC_POINTER(result); double t =
2002 Jan 17
2
Solaris 2.6 Compile (PR#1268)
Full_Name: Geordon Marchak Version: R-1.3.1 OS: Solaris 2.6 Submission from: (NULL) (199.67.239.91) Got the following error when compiling on Solaris 2.6 with the standard GNU gcc package (from the Sun site). BTW - linux compiles no problem (and fast too :-) # make `Makedeps' is up to date. gcc -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c
2002 May 06
2
compiling on Solaris 7 (PR#1520)
Full_Name: Chris Pelton Version: R-1.5.0 OS: Solaris & Submission from: (NULL) (169.237.121.210) I am unable to compile R-1.5.0, and am getting the following errors with make. I searched through the buglist and didn't see anything similar, although I wouldn't doubt if I was just using the wrong version of something. gcc version 3.0.3 gcc -I. -I../../src/include
2010 Jun 18
4
C Interface
Greetings, I am trying to call simple C-code from R. I am on Windows XP with RTools installed. The C-function is #include <R.h> #include <Rinternals.h> #include <Rmath.h> #include <Rdefines.h> // prevent name mangling extern "C" { SEXP __cdecl test(SEXP s){ SEXP result; PROTECT(result = NEW_NUMERIC(1)); double* ptr=NUMERIC_POINTER(result); double t =
2023 Apr 02
0
setulb() from lbfgsb.c not exported
Hello, It appears that the file ./appl/lbfgsb.c defines setulb() as a static function, and it is included in optim.c, so setulb() is not exported by the R library. I have some sofware that uses setulb() directly, and I would prefer to avoid having to recompile this sofware to export that function. Is there any way to get access to setulb(), or must I use the lower and upper params in optimix?
2016 Oct 10
0
optim(…?=, =?utf-8?Q?method=‘L-BFGS-B’) stops with an error message while violating the lower bound
>>>>> Spencer Graves <spencer.graves at prodsyse.com> >>>>> on Sat, 8 Oct 2016 18:03:43 -0500 writes: [.............] > 2. It would be interesting to know if the > current algorithm behind optim and optimx with > method='L-BFGS-B' incorporates Morales and Nocedal (2011) > 'Remark on ?Algorithm 778:
2013 Jun 16
4
can't install rugarch and nloptr packages in R 3.01 opensuse linux
I can't install rugarch package because installation of nloptr package fails . I use opensuse 12.3 # uname -a Linux candide 3.7.10-1.11-desktop #1 SMP PREEMPT Thu May 16 20:27:27 UTC 2013 (adf31bb) x86_64 x86_64 x86_64 GNU/Linux my gcc version is 4.8.1 I compiled and installed R 3.01 . then I tried to install rugarch package but it fails because it can't install depended package nloptr.
2020 May 04
1
error in message printed by L-BFGS-B
Hi I have a FORTRAN version of the L-BFGS-B algorithm and I was comparing it to the code in the lbfgsb.c file available at R-4.0.0.tar.gz Everithing looks the same, except for those two lines that must be printed by the prn3lb function in case of an error (lines 3559 and 3561 in lbfgsb.c): case -5: Rprintf("l(%d) > u(%d). No feasible solution", k, k); break; case -7:
2008 Jan 19
1
R_alloc segfaults
I want to write a little stand-alone C program that calls R_alloc, but I get a segmentation fault: int main(int argc, char** argv){ double* d = (double *)R_alloc(2, sizeof(double)); // <- segmentation fault! return 0; } gdb reveals that sizeof(double) evaluated to 0: > R_alloc (nelem=2, eltsize=0) at memory.c:1649 so it results in the segfault later. This is how I compile my