开发者

What's the meaning of tmax of the control parameter in optim of R?

I'm new to R and data mining/ machine learning.

I'm trying to understand the use of optim with SANN method.

I found the documentation of the parameter tmax as follows:

tmax
    is the number of function evaluations at each temperature for the "SANN" method. Defaults to 10.

What does that suppose to mean ?

In my understanding of SANN, you just need to come up with one candidate solution at each temperature. So I don't kn开发者_C百科ow what does this tmax means. Does it mean you can try up totmaxcandidates and then choose the best one to proceed ?


Try making the temperature function listed in the documentation into an R function so you can experiment:

tf <- function(t,temp,tmax) temp / log(((t-1) %/% tmax)*tmax + exp(1))
curve(tf(x,temp=10,tmax=10),from=1,to=1000)
curve(tf(x,temp=10,tmax=100),col=2,add=TRUE)
curve(tf(x,temp=10,tmax=5),col=4,add=TRUE)

(Bottom line: yes, tmax keeps the temperature fixed at a specified temperature for longer. You don't choose the best option from each temperature -- rather, at each step you pick a candidate option and compare it to the previously kept option according to the simulated annealing (Metropolis) rule ...)

What's the meaning of tmax of the control parameter in optim of R?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜