simulated_annealing {changepointsHD} | R Documentation |
Estimates a single change-point using the simulated annealing method.
simulated_annealing(object, niter = 500, min_beta = 1e-04, buff = 100) ## S4 method for signature 'changepointsMod' simulated_annealing(object, niter = 500, min_beta = 1e-04, buff = 100)
object |
Corresponding |
niter |
Number of simulated annealing iterations. |
min_beta |
Lowest temperature. |
buff |
Distance from edge of sample to be maintained during search. |
An updated version of the change-point model. The update will effect:
1) the part_values
and/or whole_values
(depending on the initial
values provided). 2) An estimate for the current change-point. 3) The trace
for the search.
Leland Bybee <lelandb@umich.edu>
set.seed(334) scp_data = read.table(system.file("extdata", "scp.txt", package="changepointsHD")) scp_data = as.matrix(scp_data) # prox gradient black-box method cov_est = cov(scp_data) init = solve(cov_est) res_map = prox_gradient_mapping(scp_data, init, 0.1, 0.99, 0.1, 100, 1e-20) # prox gradient black-box ll res_ll = prox_gradient_ll(scp_data, res_map, 0.1) prox_gradient_params=list() prox_gradient_params$update_w = 0.1 prox_gradient_params$update_change = 0.99 prox_gradient_params$regularizer = 0.1 prox_gradient_params$max_iter = 1 prox_gradient_params$tol = 1e-5 prox_gradient_ll_params=list() prox_gradient_ll_params$regularizer = 0.1 changepoints_mod = changepointsMod(bbmod=prox_gradient_mapping, log_likelihood=prox_gradient_ll, bbmod_params=prox_gradient_params, ll_params=prox_gradient_ll_params, part_values=list(init, init), data=list(scp_data)) changepoints_mod = simulated_annealing(changepoints_mod, buff=10)