Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

demo_iris

Fits Gaussian Mixture model and computes the KSD value for the model


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

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


KSD

Goodness-of-Fit Tests using Kernelized Stein Discrepancy

v1.0.1
MIT + file LICENSE
Authors
Min Hyung Kang [aut, cre], Qiang Liu [aut]
Initial release
2021-01-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.