demo_iris {KSD} | R Documentation |
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 |
[Package KSD version 1.0.1 Index]