Displaying 5 results from an estimated 5 matches for "grcount".
Did you mean:
arcount
2012 Oct 28
0
lbfgsb from C
...ouble *gr, void *ex) {
gr[0] = 2*par[0];
gr[1] = 2*par[1];
}
int main(void) {
int n = 2;
int m = 5;
double init[] = {2,3};
double lower[] = {-100, -100};
double upper[] = {100, 100};
int nbd[] = {0, 0};
double Fmin;
int fail;
void *ex = 0;
double factr = 1e7;
double pgtol = 0;
int fncount;
int grcount;
int maxit = 10;
char msg[1000];
int trace = 0;
int nREPORT = 10;
/* from http://cran.r-project.org/doc/manuals/R-exts.html#Optimization
void lbfgsb(int n, int lmm, double *x, double *lower,
double *upper, int *nbd, double *Fmin, optimfn fn,...
2012 Jun 08
0
Working with optim in C
...{
for(int i = 0; i < n; i++) { gr[i] = log(par[i]) - log(1-par[i]); }
}
void Test(SEXP SomeValues)
{
PROTECT(SomeValues = AS_NUMERIC(SomeValues));
double * CValues = NUMERIC_POINTER(SomeValues);
void * optEx, *grEx, *overallEx;
int mask = -1, fncount, grcount, failed;
double *Fmax, *gradients;
int size = sizeof(CValues)/sizeof(double);
vmmin(size, CValues, Fmax,
optimfn,
optimgr,
20, 0, mask, .00001, .000001, 40,
overallEx, fncount, grcount, failed);
}
!~~ END COD...
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 optim.c codes
at R sites and it's a structure that has bunch of objects such as SEXP
R_fcall, SEXP R_gcall, SEXP R_env, double* ndeps, etc. I cannot figure out
what it is about.
How ab...
2008 Oct 03
1
Memory crash
...t below. Can this be an R
bug? I suspect it has to do with repeated calls to 'vmmin' like this:
for (...){
vmax = vmaxget();
vmmin(*p, b, &Fmin,
bfun, bfun_gr, *maxit, *trace,
mask, abstol, reltol, nREPORT,
ext, &fncount, &grcount, &fail);
vmaxset(vmax);
...
}
but I am only guessing. Any suggestions?
Ubuntu 8.04, R-2.7.2.
G?ran
-------------------------------------------------------------------
> glmmboot(y ~ x, cluster = cluster, data = res$dat, family =
binomial, boot = 400)
Pro...
2007 Oct 23
0
API for optimization with Simulated annealing
...;
+typedef void sagenptry(int, double *, double *, double, void *);
void vmmin(int n, double *b, double *Fmin,
optimfn fn, optimgr gr, int maxit, int trace,
@@ -82,8 +83,8 @@
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);
-void samin(int n, double *pb, double *yb, optimfn fn, int maxit,
- int tmax, double ti, int trace, void *ex);
+void samin(int n, double *pb, double *yb, optimfn fn, sagenptry *new_candidate,
+ int maxit, int tmax, double ti, int trace,...