ChangeObservations function

Change the observations of fitted Dirichlet Process.

Change the observations of fitted Dirichlet Process.

Using a fitted Dirichlet process object include new data. The new data will be assigned to the best fitting cluster for each point.

ChangeObservations(dpobj, newData)

Arguments

  • dpobj: The Dirichlet process object.
  • newData: New data to be included

Returns

Changed Dirichlet process object

Examples

y <- rnorm(10) dp <- DirichletProcessGaussian(y) dp <- ChangeObservations(dp, rnorm(10))