posterior_estimate.DetectCpObj | R Documentation |
The posterior_estimate
method estimates the change points of the data making use of the salso algorithm, for a DetectCPObj
class object.
## S3 method for class 'DetectCpObj'
posterior_estimate(
object,
loss = "VI",
maxNClusters = 0,
nRuns = 16,
maxZealousAttempts = 10,
...
)
object |
an object of class |
loss |
The loss function used to estimate the final partition, it can be "VI", "binder", "omARI", "NVI", "ID", "NID". |
maxNClusters |
maximum number of clusters in salso procedure. |
nRuns |
number of runs in salso procedure. |
maxZealousAttempts |
maximum number of zealous attempts in salso procedure. |
... |
parameter of the generic method. |
put details here
The function returns a vector with the cluster assignment of each observation.
D. B. Dahl, D. J. Johnson, and P. Müller (2022), Search Algorithms and Loss Functions for Bayesian Clustering, Journal of Computational and Graphical Statistics, 31(4), 1189-1201, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/10618600.2022.2069779")}.
data_vec <- as.numeric(c(rnorm(50,0,0.1), rnorm(50,1,0.25)))
out <- detect_cp(data = data_vec, n_iterations = 1000, n_burnin = 100,
params = list(q = 0.25, phi = 0.1, a = 1, b = 1, c = 0.1), kernel = "ts")
posterior_estimate(out)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.