plotgmm: Plots histogram for 1-d GMM given the dataset

Description Usage Arguments Examples

View source: R/gmm.R

Description

Plots histogram for 1-d GMM given the dataset

Usage

1
plotgmm(data, mu = NULL)

Arguments

data

(n by 1): The dataset of interest, where n is the number of samples.

mu

: True mean of the GMM (optional)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Plot pdf histogram for a given dataset
model <- gmm()
X <- rgmm(model)
plotgmm(data=X)

# Plot pdf histogram for a given dataset, with lines that indicate the mean
model <- gmm()
mu <- model$mu
X <- rgmm(model)
plotgmm(data=X, mu=mu)

Example output



KSD documentation built on Jan. 13, 2021, 8:39 a.m.

Related to plotgmm in KSD...