Determine whether an R object represents a partition of objects, or coerce to an R object representing such.
1 2 3 4 5 6
an R object.
is.cl_hard_partition are generic
The methods provided in package clue handle the partitions obtained from clustering functions in the base R distribution, as well as packages RWeka, cba, cclust, cluster, e1071, flexclust, flexmix, kernlab, mclust, movMF and skmeans (and of course, clue itself).
is.cl_soft_partition gives true iff
is.cl_hard_partition is false.
as.cl_partition returns an object of class
"cl_partition" “containing” the given object
this already represents a partition (i.e.,
is true), or the memberships obtained from
as.cl_hard_partition(x) returns an object which has class
"cl_hard_partition" and inherits from
x if it already represents a hard partition (i.e.,
is.cl_hard_partition(x) is true), or the class
ids obtained from
x if this is an atomic vector
of raw class ids, or, if
x represents a soft partition or is a
raw matrix of membership values, using the class ids of the
nearest hard partition, defined by taking the class ids of the
(first) maximal membership values.
Conceptually, partitions and hard partitions are virtual classes, allowing for a variety of representations.
There are group methods for comparing partitions and computing their
minimum, maximum, and range based on the meet and join operations, see
For the testing functions, a logical indicating whether the given object represents a clustering of objects of the respective kind.
For the coercion functions, a container object inheriting from
"cl_partition", with a suitable representation of the partition
1 2 3 4 5