Class RandomUniformGenerated

  • All Implemented Interfaces:
    KMeansInitialization

    @Priority(-101)
    @Reference(authors="R. C. Jancey",
               title="Multidimensional group analysis",
               booktitle="Australian Journal of Botany 14(1)",
               url="https://doi.org/10.1071/BT9660127",
               bibkey="doi:10.1071/BT9660127")
    public class RandomUniformGenerated
    extends AbstractKMeansInitialization
    Initialize k-means by generating random vectors (uniform, within the value range of the data set).

    This is attributed to Jancey, but who wrote little more details but "introduced into known but arbitrary positions". This class assumes this refers to uniform positions within the value domain. For a normal distributed variant, see RandomNormalGenerated.

    Warning: this tends to produce empty clusters, and is one of the least effective initialization strategies, not recommended for use.

    Reference:

    R. C. Jancey
    Multidimensional group analysis
    Australian Journal of Botany 14(1)

    Since:
    0.5.0
    Author:
    Erich Schubert
    • Constructor Detail

      • RandomUniformGenerated

        public RandomUniformGenerated​(RandomFactory rnd)
        Constructor.
        Parameters:
        rnd - Random generator.
    • Method Detail

      • chooseInitialMeans

        public double[][] chooseInitialMeans​(Relation<? extends NumberVector> relation,
                                             int k,
                                             NumberVectorDistance<?> distance)
        Description copied from interface: KMeansInitialization
        Choose initial means
        Parameters:
        relation - Relation
        k - Parameter k
        distance - Distance function
        Returns:
        List of chosen means for k-means