Displaying 20 results from an estimated 94 matches for "sann".
Did you mean:
sane
2009 Oct 20
1
Buglet in optim() SANN
I think SANN method in optim() is failing to report that it has not
converged. Here is an example
genrose.f<- function(x, gs=NULL){ # objective function
## One generalization of the Rosenbrock banana valley function (n
parameters)
n <- length(x)
if(is.null(gs)) { gs=100.0 }
fval<-1.0 + su...
2008 Jan 18
1
constrOptim with method SANN
Hi Everyone,
I'm trying to minimize a function using constrOptim with
the simulated annealing method SANN.
If I understand constrOptim well, it basically passes most
of its arguments to optim while somehow enforcing the constraints.
My problem is, that since SANN does not need gradients,
when using optim with SANN, the gr argument of optim is
used to specify a function to create the next candidate po...
2003 Jul 16
2
numerical differentiation in R? (for optim "SANN" parscale)
Dear R users,
I am running a maximum likelihood model with optim. I chose the
simulated annealing method (method="SANN").
SANN is not performing bad, but I guess it would be much more effecive
if I could set the `parscale' parameter.
The help sais:
`parscale' A vector of scaling values for the parameters.
Optimization is performed on `par/parscale' and these should
be compa...
2011 Dec 16
1
optim with simulated annealing SANN for combinatorial optimization
...nto the next problem:
1.- Given a NxN grid of points, with some values in each cell
2.- Find the combination of K points on the grid such that, the maximum
mean value is obtained
I took the Travel SalesMan problem example in ?optim documentation. I am
not sure if I have understood correctly the SANN implementation in optim,
as I do not see how the acceptance probability comes out. And it looks like
I am only evaluating the criteria several times and keep the maximum at the
end.
Thanks in advance
Here is some example code in R
####### toy example
N=5
K=6
new.points = expand.grid(1:N,1:N)...
2004 May 28
1
optim(method="SANN")
Hello List
I'm working on a combinatoric problem in which the object is to
minimize the badness() of a vector. I think this class of problem is only
soluble by optim() using method=SANN.
The badness() of anything is >= 0, and when I've found a solution with
zero badness, I want optim() to stop (carrying on beyond zero badness
cannot improve the solution). Efficiency is crucial here.
The ?optim manpage states
For '"SANN"' 'maxit' giv...
2008 Jun 26
1
Question about Constraint Optimization
Dear All,
I am having trouble in using R function "constrOptim" to do constraint
optimization. It seems that "constrOptim" calls function "optim" when it
does the optimization, and "optim" allows us to set "method" to be "SANN"
if we want to use simulated annealing. In "optim", the function allows us
to set gradient to be NULL when we treat "method" as "SANN". But in
"constrOptim", the function does not allow us to set gradient as "SANN" if
we set "method&qu...
2008 Jan 18
0
constrOptim with SANN
Hi Everyone,
I'm trying to minimize a function using constrOptim with
the simulated annealing method SANN.
If I understand constrOptim well, it basically passes most
of its arguments to optim while somehow enforcing the constraints.
My problem is, that since SANN does not need gradients,
when using optim with SANN, the gr argument of optim is
used to specify a function to create the next candidate po...
2008 Mar 16
1
optim: why is REPORT not used in SANN?
Hello,
I wonder why the control parameter REPORT is not supported by method
SANN. Looking into optim.c I found an internal constant:
#define STEPS 100
... and decreasing this to 10 helped me fine-tuning the annealing
parameters in an actual problem.
Is there any reason why not passing nREPORT to samin and setting
something like:
STEPS = nREPORT / tmax
Thomas P.
--
T...
2009 Apr 07
0
Repeated SANN values.
I tried optim using the SANN algoithm. To start things out I tried the example of solving the "traveling salesman" problem as given in the documentation. The example works just fine. But if I comment out the line:
set.seed(123) # chosen to get a good soln relatively quickly
More often than not it doesn't conver...
2013 Feb 27
2
temp seems ineffective in SANN (optim)
I am trying to control the behavior of the SANN method in optim (R
2.14.1) via control$temp. In my toy tests it works; in my real use, it
doesn't.
As far as I can tell my code with different temp values is loaded; I
even traced into the function that calls optim and verified temp had the
value I had set.
Could the fact that I have NaN'...
2009 Nov 19
1
optim(.. ,"SANN",..)
...5
7 20
8 70
9 45
10 12000
and the strange function fr which I want to maximise:
fr<-function(x){y<-x*D
C<-apply(t(apply(y,1,function(c){c[c>0]})),1,prod)
R2<-R*C
w<-R2[R2<P]
g<-sum(w)
return(g)}
v<-c(1,1,1,1,1,1,1,1,1,1)
res <- optim(v, fr, method="SANN",
control=list(maxit=200, temp=20,v))
I get the following error:
Error in prod(..., na.rm = na.rm) : invalid 'type' (list) of argument
I'm not sure if its because this function is too disjoint to be opimised using SANN or I am not using optim properly.
Any help or...
2017 Mar 13
2
[RFC] improvements to LLVM diagnostic infrastructure
...tics for all the LLVM tools.
I intend to implement the necessary infrastructure and convert a (small) number of diagnostics. Further conversions can be done incrementally.
Any comments on this approach? Is this the right direction for diagnostics in LLVM? Suggestions more than welcome!
Thanks,
Sanne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170313/49b7bc0a/attachment.html>
2002 Aug 13
1
Rcmd SHLIB under NT
Hello:
I'm trying to use Rcmd SHLIB to compile a single file, sann.c, to
get sann.dll.
I was able to get
make libR.a
to work, after going into MkRules and changing the line
DLLTOOL=$(BINPREF)dlltool -k --as $(AS)
to read
DLLTOOL=C:/MINGW-1.1/bin/dlltool -k --as $(AS)
But now I get:
C:\rw1051\src\gnuwin32>Rcmd SHLIB sann.c
make: make: Command not found
m...
2011 Dec 16
1
Fortune? -- was Re: optim with simulated annealing SANN ...
Folks:
I thought John Nash's comment below was profound and a possible
Fortunes candidate:
(Aside: I believe it applies to a great deal of what is discussed on
this list, not just stochastic optimization.)
Cheers,
Bert
... (in the context of stochastic optimization)
>... As with many tools in this domain, for effective use they
> require more knowledge than many of their users
2009 Mar 29
4
Constrined dependent optimization.
I have an optimization question that I was hoping to get some suggestions on how best to go about sovling it. I would think there is probably a package that addresses this problem.
This is an ordering optimzation problem. Best to describe it with a simple example. Say I have 100 "bins" each with a ball in it numbered from 1 to 100. Each bin can only hold one ball. This optimization is
2010 Sep 04
3
How can I fixe convergence=1 in optim
Hi R users,
I am using the optim funciton to maximize a log likelihood function. My
code is as follows:
p<-optim(c(-0.2392925,0.4653128,-0.8332286, 0.0657, -0.0031, -0.00245,
3.366, 0.5885, -0.00008,
0.0786,-0.00292,-0.00081, 3.266, -0.3632, -0.000049, 0.1856,
0.00394, -0.00193, -0.889, 0.5379, -0.000063,
0.213, 0.00338, -0.00026, -0.8912, -0.3023, -0.000056), f,
2001 Feb 20
0
dyn.load() and dyn.unload() under Windows
...c\include
dlltool --export-all-symbols --output-def weaklink.def weaklink.o
gcc --shared -o ..\libs\weaklink.dll weaklink.def weaklink.o
-LD:/Rw1021/src/gnuwin32 -lR
The file weaklink.def made by mingw32 looks like this:
; dlltool --export-all-symbols --output-def weaklink.def weaklink.o
EXPORTS
sann @ 1 ;
combn2 @ 2 ;
In the file D:\Rw1021\library\weaklink\R\weaklink, I have this function:
.First.lib <- function(lib, pkg) {
library.dynam("weaklink", pkg, lib)
require(MASS)
}
In weaklink.c, there are two functions declared, as
__declspec (dllexport) SEXP sann(SEXP input);...
2011 Apr 18
3
how to extract options for a function call
Hi, I'm having some difficulties formulating this question.
But what I want,
is to extract the options associated with a parameter for a function.
e.g.
method = c("Nelder-Mead", "BFGS", "CG", "L-BFGS-B", "SANN")
in the optim function.
So I would like to have a vector with
c("Nelder-Mead", "BFGS", "CG", "L-BFGS-B", "SANN")
Or for instance the 'method' in the dist function can be supplied with
euclidian,maximum,manhatten, canberra,binary,min...
2010 Apr 07
6
using ipoib with xcp
...red in a pool. I''ve also
checked that the PIFs are in the same order on both nodes (the reference
mentions this). The MTU (1500) of brib0 differs from that of ib0 (2044), but
changing this does not solve the problem.
Any help is much appreciated. Thanks!
Trygve
--
HypoBytes Ltd.
Trygve Sanne Hardersen
Akersveien 24F
0177 Oslo
Norway
hypobytes.com
+47 40 55 30 25
_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users
2007 Feb 17
1
Solve in maximum likelihood estimation
...lowing problem.
I am doing a maximum likelihood estimation for a Kalman Filter.
For this purpose, I have to invert an error matrix Ffast of dimension
"no. parameters X no.parameters". The usualy optim methods often find only
local minima, so I decided to make the optimization using the SANN
algorithm, which is very slow already.
However, this becomes a real problem because the "reciprocal condition
number" of Ffast becomes extremely small (up to 1e-1000 for the amount of
data I have) for non-sensible paramter combinations.
Thus, I need to extend the tolerance of the solv...