Description Usage Arguments Value See Also Examples
Performs the Active Function Cross-Entropy Clustering on the data set.
1 2 3 4 5 6 7 8 9 10 11 12 13 | afCEC (
points,
maxClusters,
initialLabels="k-means++",
cardMin=0.01,
costThreshold=-0.000001,
minIterations=10,
maxIterations=100,
numberOfStarts=10,
method="Hartigan",
values="quadratic",
interactive=FALSE
)
|
points |
A (#points x n) matrix of data containing n-dimensional points stored row-by-row. |
maxClusters |
Indicates the maximal number of clusters, that afCEC can partition the data into. |
initialLabels |
Initial labelling determining the data membership to the particular clusters. There are 3 options allowed:
The defalt value is "k-means++". |
cardMin |
Value so that if the number of points in particular cluster relatively to the size of the whole data drops bellow, then that cluster gets removed and it's data is assigned to the other clusters. The default value is 0.01. |
costThreshold |
Negative value so that if the difference between the calculated cost in the subsequent iterations is greater than it then the afCEC terminates returning the solution from the terminated iteration as the final solution (in the present start), provided that at least minIterations already passed. The default value is -0.000001; |
minIterations |
Value indicating the minimal number of iterations needed before afCEC can terminate, provided that no error occurred. The default value is 10. |
maxIterations |
Value indicating the maximal number of iterations in one start, that afCEC cannot exceed. The default value is 100. |
numberOfStarts |
Value indicating the number of runs of the algorithm to be performed. The best solution is chosen out of the solutions given in the particular steps, so that it has the lowest value of the cost function among them. The default value is 10. |
method |
Heuristics used to perform the clustering. There are 2 options allowed:
The default value is "Hartigan". |
values |
Definition of the active function family used to perform the clustering. There are 2 options allowed:
The default value is "quadratic".
|
interactive |
Indicates if the algorithm runs in the "interactive" mode. The "interactive" mode allows to track the intermediate steps of the afCEC. Instead of one object of the afCEC class, the whole list of such objects is returned, where each item of the list corresponds to the intermediate step of the algorithm. See |
Empty list - if clustering failed.
Object of class afCEC containing the parameters of the best fitted mixed generalized multivariate normal distribution - if argument interactive=FALSE and clustering succeded.
List of k objects of class afCEC containing the parameters of the best fitted mixed generalized multivariate normal distribution across the k subsequent steps of the algorithm - if argument interactive=TRUE and clustering succeeded.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
## Not run:
# The following two examples demonstrate two equivalent ways of passing the same
# 3D quadratic active function to the afCEC routine:
# 1) Using "quadratic" value (default):
library(afCEC);
data(airplane);
result <- afCEC(airplane, 17);
# what is equivalent to:
library(afCEC);
data(airplane);
result <- afCEC(airplane, 17, values="quadratic");
# 2) Using the matrix containing the explicit values of the active function
# across the subsequent dimensions:
library(afCEC);
data(airplane);
values = matrix(rep(0, 5*3*dim(airplane)[1]), 5*3, dim(airplane)[1]);
for (i in 1:dim(airplane)[1]) {
tmp <- airplane[i,2:3];
for (j in 1:3) {
values[((j - 1) * 5) + 1, i] <- tmp[1]^2;
values[((j - 1) * 5) + 2, i] <- tmp[2]^2;
values[((j - 1) * 5) + 3, i] <- tmp[1];
values[((j - 1) * 5) + 4, i] <- tmp[2];
values[((j - 1) * 5) + 5, i] <- 1;
if (j < 3) tmp[j] <- airplane[i,j];
}
}
result <- afCEC(airplane, 17, values=values);
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.