| hanaml.GaussianMixture {hana.ml.r} | R Documentation |
hanaml.GaussianMixture is a R wrapper for PAL Gaussian Mixture Model (GMM).
hanaml.GaussianMixture(conn.context,
data = NULL,
key = NULL,
features = NULL,
n.components = NULL,
init.param = NULL,
init.centers = NULL,
covariance.type = NULL,
shared.covariance = NULL,
thread.ratio = NULL,
max.iter = NULL,
category.weight = NULL,
categorical.variable = NULL,
error.tol = NULL,
regularization = NULL,
random.seed = NULL)
conn.context |
|
data |
|
key |
|
features |
|
n.components |
|
init.param |
|
init.centers |
|
covariance.type |
Defaults to 'full'. |
shared.covariance |
|
thread.ratio |
|
max.iter |
|
category.weight |
|
categorical.variable |
|
error.tol |
|
regularization |
|
random.seed |
Defaults to 0. |
R6Class object
labels : DataFrame
Label assigned to each sample.
model : DataFrame
Model content.
stats : DataFrame
Statistic value.
## Not run:
Input DataFrame data:
ID X1 X2 X3
0 0.10 0.10 1
1 0.11 0.10 1
2 0.10 0.11 1
3 0.11 0.11 1
4 0.12 0.11 1
Model traning and a "GaussianMixture" object gmm is returned:
> gmm <- hanaml.GaussianMixture(conn.context = conn,
data = data,
key = "ID",
n.components = 2,
init.param = 'k.means++',
covariance.type = 'full',
shared.covariance = TRUE,
thread.ratio = 0,
max.iter = 100,
category.weight = 0.707,
error.tol = 2.5,
regularization = 2.5,
random.seed = 5)
Expected output:
> gmm$labels$Collect()
ID CLUSTER_ID PROBABILITY
0 0 1
1 0 1
2 0 0
3 0 0
4 0 0
0 1 0
1 1 0
2 1 1
3 1 1
4 1 1
## End(Not run)