Bliss_Simulated_Annealing {bliss} | R Documentation |
A Simulated Annealing algorithm to compute the Bliss estimate.
Bliss_Simulated_Annealing(
beta_sample,
normalization_values,
param,
verbose = FALSE
)
beta_sample |
a matrix. Each row is a coefficient function computed from the posterior sample. |
normalization_values |
a matrix given by the function |
param |
a list containing:
|
verbose |
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
.
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)