demo_iris: Fits Gaussian Mixture model and computes the KSD value for...

Description Usage Arguments

View source: R/demo_iris.R

Description

We fit a Gaussian Mixture Model for a given dataset (Fisher's Iris), and we compute the KSD P-value on the hold-out test dataset. User may tune the parameters and observe the change in results. Reports average of p-values obtained during each k-fold. It also plots the contour for each k-fold iteration if only 2 dimensions of data are used. If a vector is specified for nClust, the code tries each element as the number of clusters and reports the optimal parameter by choosing one with highest p-value.

Usage

1
demo_iris(cols = c(1, 2), nClust = 3, kfold = 5)

Arguments

cols

: Columns of iris data set to use. If 2 dimensions, plots the contour for each k-fold.

nClust

: Number of clusters want to estimate with If vector, use each element as number of clusters and reports the optimal number.

kfold

: Number of k to use for k-fold


MinHyung-Kang/KSD documentation built on Jan. 23, 2021, 3:45 p.m.