A Simulated Annealing algorithm to compute the Bliss estimate.
Bliss_Simulated_Annealing(
beta_sample,
normalization_values,
param,
verbose = FALSE
)
a matrix. Each row is a coefficient function computed from the posterior sample.
a matrix given by the function Bliss_Gibbs_Sampler
.
a list containing:
a numerical vector, the time points.
an integer, the number of intervals.
a character vector (optional). The possible values are "uniform" (default), "epanechnikov", "gauss" and "triangular" which correspond to different basis functions to expand the coefficient function and the functional covariates
an integer (optional), the number of iteration to drop from the posterior sample.
an integer (optional), the number of iteration of the Simulated Annealing algorithm.
an integer (optional), the maximal number of intervals for the Simulated Annealing algorithm.
an integer (optional), the maximal interval length for the Simulated Annealing algorithm.
a nonnegative value (optional), the initial temperature for the cooling function of the Simulated Annealing algorithm.
write stuff if TRUE (optional).
a list containing:
a numerical vector, corresponding to the Bliss estimate of the coefficient function.
a numerical vector, which is the posterior expectation of the coefficient function for each time points.
a matrix, the trace of the algorithm.
an integer, the index of the iteration minimizing the Bliss loss.
a numerical vector, the difference between the Bliss estimate and the smooth estimate.
a numerical vector, a smooth version of difference
.
# \donttest{
data(data1)
data(param1)
param1$grids<-data1$grids
# result of res_bliss1<-fit_Bliss(data=data1,param=param1)
data(res_bliss1)
beta_sample <- compute_beta_sample(posterior_sample=res_bliss1$posterior_sample,
param=param1,Q=1)
param_test<-list(grid=param1$grids[[1]],iter=1e3,K=2)
test<-Bliss_Simulated_Annealing(beta_sample[[1]],
res_bliss1$posterior_sample$param$normalization_values[[1]],
param=param_test)
ylim <- range(range(test$Bliss_estimate),range(test$Smooth_estimate))
plot(param_test$grid,test$Bliss_estimate,type="l",ylim=ylim)
lines(param_test$grid,test$Smooth_estimate,lty=2)
# }