Displaying 20 results from an estimated 33 matches for "factr".
Did you mean:
fact
2004 Jun 23
1
How to define stopping criterium for Optim with L-BFGS-B
Hi,
I am using optim with a L-BFGS-B method to minimize a function. As I've
understood, the way to specify a tolerance for stopping optimization is
through "factr" argument.
My function, is by construction, minimal when equal to 1. I wonder if there
is any way to pass this info to "optim". If not, how "factr" argument works
(I am quite confused about the relationship between this argument and the
Machine eps). Please, could someone g...
2008 Oct 02
1
In the OPTIM message....
..., in OPTIM, I've got the following message.
---------------------------------------------------------------------
$par
[1] 0.176166426835580
$value
[1] 1322.17600079332
$counts
function gradient
8 8
$convergence
[1] 0
$message
[1] "CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH"
$hessian
[,1]
[1,] 46300.3853279247
---------------------------------------------------------------------
First, what does that message, "CONVERGENCE: REL_REDUCTION_OF_F <=
FACTR*EPSMCH", mean? and I am wondering if the estimates are reliable.
Any co...
2005 Sep 06
1
R: optim
hi all
i dont understand the error message that is produced by the optim
function. can anybody help???
ie:
[[1]]$message
[1] "CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH"
can anyone help?
###########################################################################
SK.FIT(XDATA=a,XDATAname="a",PHI1=1,v=5,vlo=2,vhi=300,phi2lo=.01)
[[1]]
[[1]]$par
[1] -0.01377906 0.83859445 0.34675230 300.00000000
[[1]]$value
[1] 90.59185
[[1]]$counts...
2008 Oct 26
0
LMER quasibinomial
....040113 22.7
factor(group)3 2.372638 0.040184 59.0
capacity:factor(group)2 -0.173956 0.003606 -48.2
capacity:factor(group)3 -0.380799 0.003631 -104.9
Correlation of Fixed Effects:
(Intr) capcty fct()2 fct()3 cp:()2
capacity -0.322
factr(grp)2 -0.709 0.228
factr(grp)3 -0.708 0.228 0.502
cpcty:fc()2 0.235 -0.730 -0.309 -0.166
cpcty:fc()3 0.233 -0.725 -0.165 -0.304 0.529
-----------
Results 3
-----------
Generalized linear mixed model fit by the Laplace approximation
Formula: entrypr...
2012 Mar 20
2
Constraint Linear regression
...od="L-BFGS-B",
lower=rep(0, 3),
upper=rep(1, 3))
D1.unbound
$par
c1 c2 c3
0.004387706 0.203562156 0.300825550
$value
[1] 0.07811152
$counts
function gradient
8 8
$convergence
[1] 0
$message
[1] "CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH"
Any suggestion on how to fix the error "CONVERGENCE: REL_REDUCTION_OF_F <=
FACTR*EPSMCH"?
[[alternative HTML version deleted]]
2012 Oct 28
0
lbfgsb from C
...eturn result;
}
void grad(int n, double *par, double *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 *n...
2008 Mar 31
2
L-BFGS-B needs finite values of 'fn'
...x)-k)^2
return(r)
}
gr <- function(x) {
n <- length(x)
r <- (b^(0:(n-1)))*(1/x) - 4000000*(sum(x)-k)
return(r)
}
nvar <- 10
(sols <- optim(rep(20,nvar),f,gr,method="L-BFGS-B",lower=rep(0,nvar),upper=rep(k,nvar),control=list(fnscale=-1,parscale=rep(2000,nvar),factr=1e-300,pgtol=1e-300)))
2006 Jun 06
2
How to create list of objects?
...Class Mode
IP 0 mle list
NE 0 mle list
I don't get the output I would have, i.e. the one from
> summary(f$IP)
summary(f$IP)
Maximum likelihood estimation
Call:
mle(minuslogl = IPNeglogPoisL, method = "L-BFGS-B", fixed = list(),
control = list(maxit = 1e+08, factr = 1e-20))
Coefficients:
Estimate Std. Error
a 1242.0185506 44.92341097
b 0.8802538 0.01685811
-2 log L: 145.3509
What I want to do is something like:
AICs <- AIC(logLik(f))
and then have all the AICs in the vector AICs.
It must be possible or is this again a namespace issue?
R...
2004 Aug 03
1
nlminb vs optim
...ues the minimisation. It stops and
gives a
(-log(likelihood))=6104.45, with the messages:
"there are 50 or more warnings"
( warnings() = "multi-arguments returns are deprecated" in a function used
by the program)
$convergence=0
$message= CONVERGENCE:REL_REDUCTION_OF_F <= FACTR*EPSMCH
What does it mean? Is the convergence reached?
What can it be concluded from these two steps?
Thank you very much for your advices and help.
2009 Sep 30
1
Optim(...) estimate of stDev far too low
...,upper = rep(Inf, 2), hessian=TRUE, control=list(trace=1))
iter 0 value 3.011784
final value 2.802694
converged
$par
[1] 4.6597779 0.3860387
$value
[1] 2.802694
$counts
function gradient
17 17
$convergence
[1] 0
$message
[1] "CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH"
WHich gives an estimate of stDev = 0.38
while the empirical stDev = 1.94
Is there anything wrong above in the code?
Thanks in advance
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...
2000 Jul 28
1
optim gets stuck
...ally, everything works fine, but for some simulations, the algorithm just
gets stuck.
When I let my function (+gradient) evaluation print out the
function value, I see that L-BFGS-B keeps calling the function with
arguments giving the same function value (up to at least the accuracy
required by factr, i.e. 1E-8). So, I don't really understand
why it doesn't stop.
Is this a well-known problem?
The main problem is that the optimization doesn't stop (at least not
in reasonable time) and so the whole simulation gets stuck. Is there a way
to control the time used by "L-BFGS-B&qu...
2012 Oct 10
1
"optim" and "nlminb"
...r,Linn,hessian=TRUE, method=c("L-BFGS-B"),control =
list(trace=1,abstol=0.001),lower=c(0,0,0,0,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf),upper=c(1,1,1,1,Inf,Inf,Inf,Inf,Inf,Inf,Inf,Inf,Inf))
#nlminb package
estimate<-nlminb(init.par,Linn,gr=NULL,hessian=TRUE,control =
list(trace=1,factr=1),lower=c(0,0,0,0,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf),upper=c(1,1,1,1,Inf,Inf,Inf,Inf,Inf,Inf,Inf,Inf,Inf))
I did not get same results from above equations. Log-likelihood values are
close but parameter estimation completely different.
My expectation is very close to "nlminb"...
2009 Sep 24
1
Maximum likelihood estimation of parameters make no biological sense
...Winf k t0 b sigma
[1] 24.27206813 0.04679844 0.00100000 1.61760492 0.01000000
$value
[1] -11.69524
$counts
function gradient
143 143
$convergence
[1] 0
$message
[1] "CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH"
$hessian
[,1] [,2] [,3] [,4] [,5]
[1,] 1.867150e+00 1.262763e+03 -7.857719 -5.153276e+01 -1.492850e-05
[2,] 1.262763e+03 8.608461e+05 -5512.469266 -3.562137e+04 9.693180e-05
[3,] -7.857719e+00 -5.512469e+03 41.670222 2.47316...
2007 Feb 16
1
optim() and resultant hessian
...and using these as starting values in the next function call.
The final call to optim() returns the following:
$par
[1] 0.2272361 0.8037642 26.8591998 3.0631280 0.2224566
$value
[1] -46.13906
$counts
function gradient
4 4
$convergence
[1] 0
$message
[1] "CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH"
$hessian
[,1] [,2] [,3] [,4] [,5]
[1,] 1.267070e+17 1.012691e+17 1.348054e+15 625551.58724 9.359559e+07
[2,] 1.012691e+17 8.189877e+16 1.144248e+15 569562.44945 8.699072e+07
[3,] 1.348054e+15 1.144248e+15 2.457323e+05 3426.60293 -2.297009e+03
[4,] 6.255516e+05 5.695624e+05 3.426603e+03...
2007 Jan 03
1
optim
...ambda = lambda)
The output is:
$par
[1] 0.56350964 0.56350964 0.56350964 0.56350964 0.00000000 -0.29515957
[7] 0.00569937 0.32543297 0.18615880
$value
[1] 0.2529198
$counts
function gradient
31 31
$convergence
[1] 0
$message
[1] "CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH"
Warning messages:
1: bounds can only be used with method L-BFGS-B in: optim(par, errorFunction, gr = NULL, method = "Nelder-Mead",
2: NAs introduced by coercion
If I change my "error-function" to
errorFunction <- function(localShifts,globalShift,fileName,e...
2006 Sep 06
1
Help on estimated variance in lme4
...or(sex)m 0.581713 0.296229 1.9637 0.0495616 *
ResCondCorp -0.176251 0.020263 -8.6982 < 2.2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Correlation of Fixed Effects:
(Intr) fct()1 fctr(g) fctr(s)
factr(pct)1 -0.334
fctr(gcmp)j -0.417 0.066
factor(sx)m -0.505 -0.002 -0.173
ResCondCorp -0.309 -0.010 0.302 -0.032
###
Here is the error message:
###
Warning message:
Estimated variance for factor 'factor(cdrgsaou2$ids)' is effectively zero...
2003 Feb 01
1
Trouble with optim
...0.3 8.5 --- Val = 42.70603
...
Eval fn at 0.7425713 21.12820 0.001 --- Val = 64.99
Eval fn at 0.7425713 21.12920 0.002 --- Val = 60.20449
Eval fn at 0.7425713 21.12920 0.001 --- Val = 64.99
> o$val
[1] 64.99
> o$convergence
[1] 0
> o$message
[1] "CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH"
So optim thinks it has found an optimum (i.e. minimum). But my initial
guess is better than optim's answer; and optim has visited many points
which are better than its final answer.
If I choose a different initial guess, like c(.7,10.3,1), optim reaches
the answer I expect.
What...
2002 Jul 30
1
Optim() returns wrong maximum
...n.log
$par
[1] 0.007369536 0.032623958 1.025064715 0.315420992 0.288083186
0.008728551
[7] 1.016895527 0.978822785 0.552299864 1.016390800 0.000100000
$value
[1] -1697.267
$counts
function gradient
50 50
$convergence
[1] 0
$message
[1] "CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH"
###########
Here ``likeli.time.log'' and ``gradient.time.log'' are functions,
``temp.censor'' is a list with input variables for the two functions
(data, fixed parameters, etc.), and the parameter space is of dimension
11.
Note that value returned is clearly...
2010 Nov 03
3
optim works on command-line but not inside a function
...fine:
> optRes <- optim(c(0,0), method="L-BFGS-B", fn=IRT.llZetaLambdaCorrNan,
+ gr=IRT.gradZL,
+ lower=c(-Inf, -Inf), upper=c(Inf, Inf), t=st, X=sx)
> optRes
$par
[1] -0.6975157 0.7944972
$convergence
[1] 0
$message
[1] "CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH"
Does anyone have an idea what this could be, and what I could try to avoid
this error? I tried bounding the parameters, with lower=c(-10, -10) and
upper=... but that made no difference.
Thanks,
Diederik Roijers
Utrecht University MSc student.
------
PS: the other functions I am us...