gen_K {Kmedians} | R Documentation |
gen_K
Description
Generate a sample of a Gaussian Mixture Model whose centers are generate randomly on a sphere of radius radius
.
Usage
gen_K(n=500,d=5,K=3,pcont=0,df=1,
cont="Student",min=-5,max=5,radius=5)
Arguments
n |
A positive integer giving the number of data per cluster. Default is |
d |
A positive integer giving the dimension. Default is |
K |
A positive integer giving the number of clusters. Default is |
pcont |
A scalar between |
df |
A positive integer giving the degrees of freedom of the law of the contaminated data if |
cont |
The law of the contaminated data. Can be |
min |
A scalar giving the lower bound of the uniform law if |
max |
A scalar giving the upper bound of the uniform law if |
radius |
The radius of the sphere on each the centers of the class are generated. Default is |
Value
A list with:
X |
A numerical matrix giving the generated data. |
cluster |
An character vector specifying the true classification. |
See Also
Examples
n <- 500
K <- 3
pcont <- 0.2
ech <- gen_K(n=n,K=K,pcont=pcont)
X=ech$X