Learn R Programming

dirichletprocess (version 0.4.2)

ChangeObservations: Change the observations of fitted Dirichlet Process.

Description

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

Usage

ChangeObservations(dpobj, newData)

Value

Changed Dirichlet process object

Arguments

dpobj

The Dirichlet process object.

newData

New data to be included

Examples

Run this code

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

Run the code above in your browser using DataLab