simulated_annealing: Single change-point simulated annealing method

Description Usage Arguments Value Author(s) Examples

Description

Estimates a single change-point using the simulated annealing method.

Usage

1
2
3
4
5
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)

Arguments

object

Corresponding changepointsMod class.

niter

Number of simulated annealing iterations.

min_beta

Lowest temperature.

buff

Distance from edge of sample to be maintained during search.

Value

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.

Author(s)

Leland Bybee <lelandb@umich.edu>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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)

changepointsHD documentation built on Sept. 20, 2019, 5:04 p.m.