maximple                package:mcsm                R Documentation

_G_r_a_p_h_i_c_a_l _r_e_p_r_e_s_e_n_t_a_t_i_o_n _o_f _a _t_o_y _e_x_a_m_p_l_e _o_f _s_i_m_u_l_a_t_e_d _a_n_n_e_a_l_i_n_g

_D_e_s_c_r_i_p_t_i_o_n:

     For the toy function h(x)=(cos(50*x)+sin(20*x))^2, this function
     represents simulated annealing sequences converging to a local or
     global maxima as paths on top of the function h itself. The
     simulated annealing parameters ratemp and powemp  can be changed,
     as well as the stopping rule tolerance.

_U_s_a_g_e:

     maximple(tolerance = 10^(-5), ratemp = 5, powemp = 2)

_A_r_g_u_m_e_n_t_s:

tolerance: maximal difference in the target value needed to stop the
          simulated annealing algorithm

  ratemp: scale factor of temp that determines the scale of the random
          walk

  powemp: power of 1/(1+t) used to set the temperature schedule

_V_a_l_u_e:

     The value of this function is a list, with components 

       x: coordinates of the successive values of the random walk
          produced by the simulated annealing algorithm

       y: corresponding values of h(x), of the same length as x

_A_u_t_h_o_r(_s):

     Christian P. Robert and George Casella

_R_e_f_e_r_e_n_c_e_s:

     From Chapter 5 of *EnteR Monte Carlo Statistical Methods*

_S_e_e _A_l_s_o:

     dyadic

_E_x_a_m_p_l_e_s:

     # Section 5.2.2, artificial function example 5.8

     h=function(x){(cos(50*x)+sin(20*x))^2}
     par(mar=c(4,4,1,1),mfrow=c(2,2))
     for (tt in 1:4){

       curve(h,from=0,to=1,n=10001,col="grey",lwd=2)
       sam=maximple()
       xgo=sam$x
       hgo=sam$y
       lines(xgo,hgo,col="steelblue4",lwd=2)
       points(xgo,hgo,col="steelblue4",cex=.5,pch=19)
       }

